messages cannot support Chinese(中文)
Reported by shitoupai | October 28th, 2010 @ 02:43 PM
occure on play 1.1 main from github,no problem using play 18.104.22.168
in the conf/messages, i define some message below:
cannot show correct, i think it's OrderSafeProperties problem
Comments and changes to this ticket
We also have problems using Cyrillic letters. Suspected code is OrderSafeProperties. We are using play - 1.2.RC2. I did some debugging and I can confirm that OrderSafeProperties does not interpret utf-8 encoding properly. Here is my description:
The Cyrillic letter х has Unicode code 0xd185. OrderSafeProperties.load() interprets each byte individually and when it comes to the second byte it thinks this is a new line (0x85) which apparently is not true. The second byte is wrongly interpreted of its own not in the context of previous byte (d1). This is a blocking bug, so please give us a fix in 1.2 release or even earlier. Should you need any cooperation with this issue I can do the tests or whatever you need. Thanks.
As digging deeper in the code I can see that 0x85 is used for detection of a new line. This is Unicode symbol NEL. But in UTF-8 this symbol is represented with two-byte sequence 0xc285. This obviously is not examined in the code. Generally, looking at the code, I can't see interpreting single bytes in the context of the first byte of a utf-8 byte sequence - there might be as many as 4 bytes in a sequence in utf-8.
Hi, this is probably same problem as http://play.lighthouseapp.com/projects/57987-play-framework/tickets...
can you try with the patch there?
It is almost exactly the same as 1.2
If it works we can create a custom 1.2 with this fix.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Play makes it easier to build Web applications with Java. It is a clean alternative to bloated Enterprise Java stacks. It focuses on developer productivity and targets RESTful architectures. Learn more on the <a href="http://www.playframework.org">http://www.playframework.org</a> website.<br><br>
<h2>Source code is hosted on github</h2>Check out our repository at <a href="http://github.com/playframework/play">http://github.com/playframework/play</a><br><br>
<h2>Contributing, creating a patch</h2> Please read the <a href="http://play.lighthouseapp.com/projects/57987/contributor-guide">contributor guide</a><br><br>
<h2>Reporting Security Vulnerabilities</h2> Since all bug reports are public, please report any security vulnerability directly to <em>guillaume dot bort at gmail dot com</em>.<br><br>
<h2>Creating a bug report</h2> Bug reports are incredibly helpful, so take time to report bugs and request features in our ticket tracker. We’re always grateful for patches to Play’s code. Indeed, bug reports with attached patches will get fixed far quickly than those without any.<br><br>
Please include as much relevant information as possible including the exact framework version you're using and a code snippet that reproduces the problem.<br><br>
Don't have too much expectations. Unless the bug is really a serious "everything is broken" thing, you're creating a ticket to start a discussion. Having a patch (or a branch on Github we can pull from) is better, but then again we'll only pull high quality branches that make sense to be in the core of Play.