I'm having Chinese (zh) and English resource files in my application. It 
always throws error "UNMATCHED BRACES IN THE PATTERN" once I have certain 
Chinese characters in the zh resource file, since those problem characters 
contain the ascii of "{" and it is used for identifying arguement in Struts.

For example, the ascii value of "{" is 7b, all those characters containing 
7b, i.e. \u**7b in unicode will cause the application throws the above 
error. Up until now, I found 10 of these problem characters. I'm not sure if 
this error happens in other language(esp. double-byte). But in traditional 
Chinese, these problem characters are very common and always used.

I tried putting "}" \u007d behind the problem character, another error 
"CAN"T PARSE ARGUEMENT NUMBER" throwed and it was predicted.

As suggested by Nicholas in the previous mail, we can use the unicode value 
directly in the resource file. This solution should work only if unicode 
encoding is used in the JSP. For those using Big5 encoding, the problem is 
still there, and "??" will be displayed in the JSP, instead of apache error. 
Also, is it too inconvenient to always check the character for containing 
"{" before putting into the resource file.

Now, it seems to me that Big5 encoding and Resource Bundle can't coexist in 
Struts enabled application, am I right?





_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to