You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Jerome Lelasseux (Jira)" <ji...@apache.org> on 2020/12/26 16:20:00 UTC

[jira] [Comment Edited] (NETBEANS-5181) NbBundle only accepts ISO-8859-1 while UTF-8 is default since JDK9

    [ https://issues.apache.org/jira/browse/NETBEANS-5181?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17255058#comment-17255058 ] 

Jerome Lelasseux edited comment on NETBEANS-5181 at 12/26/20, 4:19 PM:
-----------------------------------------------------------------------

To be consistent the change should also impact the IDE: with current NB12 version, when user opens a .properties file the IDE assumes ISO-8859-1 by default (unless the "Use project encoding" property is set for this file).


was (Author: jjazzboss):
To be consistent the change should also impact the IDE: with current NB12 version, when user opens a .properties file the IDE assumes ISO-8859-1 by default (unless the "Use project encoding" property is changed for this file).

> NbBundle only accepts ISO-8859-1 while UTF-8 is default since JDK9
> ------------------------------------------------------------------
>
>                 Key: NETBEANS-5181
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-5181
>             Project: NetBeans
>          Issue Type: Improvement
>          Components: nblocalization - Code, platform - Filesystems, platform - Other
>    Affects Versions: 9.0, 10.0, 11.0, 12.2
>         Environment: All
>            Reporter: Jerome Lelasseux
>            Priority: Major
>
> Since JDK9 default encoding for .properties files (resource bundle) is UTF-8. JDK's ResourceBundle.getBundle().getString() automatically handles UTF-8 or ISO-8859-1 files.
> But NbBundle.getMessage() always reads resource bundles are ISO-8859-1. And I assume it is used internally in the NB platform code, because when I use branding localization (e.g. change the main File menu title via the Branding dialog), or if I localize an action declared with annotation (@ActionRegistration(displayName="CTL_MyName", lazy=true), then the bundle file is always read as ISO.
> The platform code should be updated to rely on the JDK ResourceBundle.getBundle().
> I could try to make a patch if it's not too complicated, but I need help where to look first, I'm not familar with NB internal code.
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists