Big5 encoding and Resource Bundle can't coexist

2002-05-26 Thread Lily Chan

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 
CANT 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]




Re: Big5 encoding and Resource Bundle can't coexist

2002-05-26 Thread Antony

Lily Chan wrote:



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


Yes, BIG5 encoding cannot be used with struts resource bundles. If you
want your resource bundle to work,

try to set encoding as iso-8859-1. I know, this would make data coming
from DBMS a rendering mess.

So, I offer here a solution that worked for me. Try Cedric`s masterwork
tiles, and use its own mechanism

for internationalization. Pratically you are going to prepare a set of
jsp for EVERY language you decide

to support; that`s annoying, but that works. Wish you good luck :-)

Regards,

Antony



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