You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "davinunesdasilva (via GitHub)" <gi...@apache.org> on 2025/09/03 14:59:37 UTC
[I] HTML files opened with ISO-8859-1 encoding despite UTF-8 project configuration [netbeans]
davinunesdasilva opened a new issue, #8783:
URL: https://github.com/apache/netbeans/issues/8783
### Apache NetBeans version
Apache NetBeans 27
### What happened
HTML files are being opened with ISO-8859-1 encoding even when the project is explicitly configured to use UTF-8 encoding. This encoding mismatch causes character display issues and inconsistency across the project. Other file types (CSS, JS, Java, etc.) correctly respect the UTF-8 project configuration.
### Language / Project Type / NetBeans Component
_No response_
### How to reproduce
Create a new project or open existing project
Configure project encoding to UTF-8 (Project Properties → Sources → Encoding)
Create or open an HTML file containing UTF-8 characters (e.g., accented characters, special symbols)
Observe that the file is opened with ISO-8859-1 encoding instead of UTF-8
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Linux mint
### JDK
openjdk 21
### Apache NetBeans packaging
Apache NetBeans binary zip
### Anything else
Issue affects only HTML files; other file types (CSS, JavaScript, Java, XML) correctly use UTF-8
Problem persists across NetBeans restarts
### Are you willing to submit a pull request?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] HTML files opened with ISO-8859-1 encoding despite UTF-8 project configuration [netbeans]
Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing closed issue #8783: HTML files opened with ISO-8859-1 encoding despite UTF-8 project configuration
URL: https://github.com/apache/netbeans/issues/8783
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] HTML files opened with ISO-8859-1 encoding despite UTF-8 project configuration [netbeans]
Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on issue #8783:
URL: https://github.com/apache/netbeans/issues/8783#issuecomment-3249740796
Please show a sample project that reproduces the problem. The implementation first checks the two headers `<meta charset="...">` and `<meta http-equiv="Content-Type" content="text/html; charset=..."/>`. They will overrule any project settings.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] HTML files opened with ISO-8859-1 encoding despite UTF-8 project configuration [netbeans]
Posted by "davinunesdasilva (via GitHub)" <gi...@apache.org>.
davinunesdasilva commented on issue #8783:
URL: https://github.com/apache/netbeans/issues/8783#issuecomment-3262285770
Thank you for looking into this. I'm attaching a sample file that
demonstrates the issue. The problem occurs with HTML fragment files that
are designed to be partial documents without <head> sections, so they don't
contain meta charset declarations like <meta charset="..."> or <meta
http-equiv="Content-Type"...>. Since these fragments are legitimate HTML
files that simply lack document headers by design, they should
automatically inherit and open with the project's default charset setting
rather than falling back to a different encoding when no meta tags are
found.
Em qua., 3 de set. de 2025 às 12:31, Matthias Bläsing <
***@***.***> escreveu:
> *matthiasblaesing* left a comment (apache/netbeans#8783)
> <https://github.com/apache/netbeans/issues/8783#issuecomment-3249740796>
>
> Please show a sample project that reproduces the problem. The
> implementation first checks the two headers <meta charset="..."> and <meta
> http-equiv="Content-Type" content="text/html; charset=..."/>. They will
> overrule any project settings.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/netbeans/issues/8783#issuecomment-3249740796>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AIEMXUXU2HVHZDGNJ7IKN4D3Q4CTZAVCNFSM6AAAAACFQ5I3TCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTENBZG42DANZZGY>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] HTML files opened with ISO-8859-1 encoding despite UTF-8 project configuration [netbeans]
Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on issue #8783:
URL: https://github.com/apache/netbeans/issues/8783#issuecomment-3263704913
As you did not provide a project, I created one from scratch (Type: "HTML5/JS Application with Node.js"). I created two files inside `fragment_iso-8859-1.html` and `fragment_utf8.html` where the first ist ISO-8859-1 encoded and the latter is UTF-8 encoded. Both contain the same text, just different encoding with characters outside the ASCII range.
Project is set to ISO-8859-1 encoding:
<img width="839" height="607" alt="Image" src="https://github.com/user-attachments/assets/8734734d-94c2-4ecd-a6db-3e452f858b25" />
With that setting a file in that encoding is correctly opened:
<img width="350" height="165" alt="Image" src="https://github.com/user-attachments/assets/33502f28-3bec-42e9-8ec2-1936ce85c674" />
and a file in UTF-8 encoding shows "broken" characters:
<img width="424" height="173" alt="Image" src="https://github.com/user-attachments/assets/1a2a7001-5871-494a-ba22-b8a4b0cc1495" />
Closing both files and switching project to UTF-8 I get for the `fragment_utf8.html` file:
<img width="424" height="173" alt="Image" src="https://github.com/user-attachments/assets/d334fe75-1589-4595-9435-29343c605944" />
and for the ISO-8859-1 file:
<img width="751" height="294" alt="Image" src="https://github.com/user-attachments/assets/36bf7a89-1835-449d-b594-83428eb3cc2f" />
So this is a works-for-me. So I repeat my request: Please provide a minimal sample project, that reproduces the issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] HTML files opened with ISO-8859-1 encoding despite UTF-8 project configuration [netbeans]
Posted by "matthiasblaesing (via GitHub)" <gi...@apache.org>.
matthiasblaesing commented on issue #8783:
URL: https://github.com/apache/netbeans/issues/8783#issuecomment-3566934840
Closing as not reproducible.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists