This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | I18N - wrong encoding in language file | ||
---|---|---|---|
Product: | groovy | Reporter: | deamon <deamon> |
Component: | Editor | Assignee: | schmidtm <schmidtm> |
Status: | RESOLVED DUPLICATE | ||
Severity: | blocker | CC: | kfrank |
Priority: | P3 | Keywords: | I18N |
Version: | 6.x | ||
Hardware: | All | ||
OS: | Linux | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | incorrect encoding |
Description
deamon
2008-01-23 22:27:25 UTC
Created attachment 55454 [details]
incorrect encoding
Tested with NetBeans IDE Dev (Build 20080123145057) what is the project encoding property of your project ? nb6 does allow to change the project encoding unless its a netbeans module project, but is groovy part of the netbeans basic product or is it from update center ? if from update center then it might not have this and other feq file encoding functionality implemented yet. ken.frank@sun.com The Groovy plugin is from the update center and in the project options I can not see the encoding. thanks for confirming. I think that having the feq encoding handling code added along with project encoding property could solve this for future - for now I think that plugin propably using the encoding of the locale you are in as the encoding its assuming. I don't know what the german message bundle is - is it from a translated netbeans itself ? nb has not been translated yet completely for 6.0 however. the bundles in product translated files have had native2ascii run on them so that could be another reason why not seeing the characters ok. ken.frank@sun.com I just took a short look at this issue and found out, that the encoding of the (grails) message bundles use TWO escape characters like shown here: typeMismatch.java.net.URL=Die Eigenschaft {0} muss eine g\u00C3\u00BCltige URL sein But according to the Java documentation found here: http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html "When saving properties to a stream or loading them from a stream, the ISO 8859-1 character encoding is used. For characters that cannot be directly represented in this encoding, Unicode escapes are used; however, only a single 'u' character is allowed in an escape sequence." When i insert a new character in the message bundle using NetBeans i get the proper single-escape encoding: test.name=J\u00F6rn We have to find out what's specified in Groovy/Grails. Here's what the Grails documentation has to say about encoding of those files. http://docs.codehaus.org/display/GRAILS/Internationalization Grails uses Spring and Java I18N mechanisms to supply messages in user-specific languages. The grails-app/i18n folder contains message bundles (message_xx.properties files) which are Java property files that combine name/value pairs. The files must be saved in UTF-8 encoding if you wish to use non-ascii characters, which is contrary to standard Java properties files which use the native Java VM encoding. Grails automatically converts your UTF-8 properties files to unicode escaped ascii files prior to execution, removing a major pain-point for I18N work. Within your application you can access the message source from the application context, the bean name is "messageSource", to resolve message codes to text, or within views you can use the <g:message> tag. We are probably facing this issue here: I18N - Add support for other encodings (other than ISO-8859-1) http://www.netbeans.org/issues/show_bug.cgi?id=75906 please comment. *** This issue has been marked as a duplicate of 75906 *** |