|
I had some tanslation messages in my project's message.properties file. I moved it to a separate plugin and included the plugin in the original project, but then all special characters such as à or ö get garbled. Moving them back to the project makes them appear correctly again. Moving them to another plugin such as filterpane makes them appear badly again.
All these message.properties files are encoded in utf-8, and config.groovy is set with: grails.views.gsp.encoding = "UTF-8" grails.converters.encoding = "UTF-8" Any ideas? |
|
Hi, I've seen such behavior when I do something like `"${g.message(code:'a.b.c')}"` in a gsp. It can be overcome by using `<g:message code='a.b.c'/>` I suspect gstring evaluation happens first and gsp evaluation next thereby HTML encoding the character. Note: my above post is wrt code in gsp pages. On Aug 1, 2012 9:33 PM, "gatherer" <[hidden email]> wrote:
I had some tanslation messages in my project's message.properties file. I |
|
So did it solve your issue? On Aug 1, 2012 9:50 PM, "Raviteja Lokineni" <[hidden email]> wrote:
|
|
No it didn't. I've got message in both <g:message> tags and in ${message()} and it doesn't matter.
The only "band aid" solution I've been able to come up with is converting the message.properties files that are inside a plugin to the "ansi" format, which is not really a solution and may break with other systems and OSes. |
|
In reply to this post by gatherer
After investigating a bit this issue I found this in the grails documentation:
Source It seems to me that this is only true when the properties files are in the main grails project. When they are located in a plugin, they are not automatically converted to ascii but expected to be in ascii (ansi) format, that's why when I convert my plugins properties files to this format I work around this issue. |
|
Is this for in-place plugins, or standard plugins? Does it occur when
running from the commandline or from a WAR? On 2 August 2012 11:04, gatherer <[hidden email]> wrote: > After investigating a bit this issue I found this in the grails > documentation: > > > Grails automatically converts your UTF-8 properties files to unicode escaped > ascii files prior to execution, removing a major pain-point for I18N work. > http://grails.org/Internationalization Source > > It seems to me that this is only true when the properties files are in the > main grails project. When they are located in a plugin, they are not > automatically converted to ascii but /expected/ to be in ascii (ansi) > format, that's why when I convert my plugins properties files to this format > I work around this issue. > > > > -- > View this message in context: http://grails.1312388.n4.nabble.com/Garbled-special-characters-when-message-properties-files-are-in-plugin-tp4632551p4632582.html > Sent from the Grails - user mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
This post has NOT been accepted by the mailing list yet.
In reply to this post by bond_
Sorry for interrupting, but I can't figure out how to start a related thread (related to plugin message.properties).
I want to specify the labels for my domain object properties, which I believe I can do in the filterpane plugin, but I'm not sure how to get the plugin to pick them up. In my own message.properties file in my project, if I use the format: fp.proptery.text.<domain object>.<property>=<label value> will filterpane pick them up? Thanks in advance |
| Powered by Nabble | Edit this page |
