Re: i18n with Japanese characters and tags....

2004-03-26 Thread atchy
Thank you for your assist, Mr. Jason
(B
(BJason Lea [EMAIL PROTECTED] wrote:
(B
(B He was saying it 'can' display Japanese characters. The example doesn't
(B have any Japanese characters in in (if i remember correctly), but if
(B they are put into the properties files for the locale they will be
(B displayed.
(B
(BYep. The example app was written as a good example for i18n, so it does 
(Bnot contain any language specific characters directly in the JSPs to 
(Bshare a JSP with many languages.
(BThe messages resource files contain them.
(B
(B
(B You should look into that http://www.anassina.com/struts/i18n/i18n.html
(B page as it explains a lot.
(B 
(B I think the main problem is you have the Japanese characters already
(B converted into HTML in your application as yuo have them in the format
(B #12495;. When you use a bean to write it out, the bean tried to escape
(B any characters that are significant to HTML, and the '' character is
(B one of them. That is why it replaces your '' with 'amp;'. The bean is
(B trying to help by displaying the text you provided in HTML so that it
(B will appear as #12495; on the page. The 'filter=false' stops it doing
(B this, but also means if you have some other characters like '' in your
(B text then they won't be escaped and could cause the page to be rendered
(B incorrectly.
(B
(Bcarlo,
(BThe behavior of bean:write is correct and proper.
(B
(BWhen you write Japanese in your message resource files, you should not 
(Buse the HTML numeric character 
(Breferences(http://www.w3.org/TR/html401/charset.html#h-5.3.1).
(BOr if you insist on using #x, set filter=false.
(B
(B
(BAs I and Jason said, the most common way is, write Japanese characters 
(Binto message resource files directly (using a text editor and input 
(Bmethod that can handle Japanese) and convert using native2ascii.
(B
(B
(B
(B When I display Japanese characters on my pages I store them in Japanese
(B in a .properties file, then use native2ascii to convert those japanese
(B characters into the Java Unicode properties file format of \u. When
(B java reads them in, the actual unicode character is passed around in
(B java and output directly into the html page. The page encoding is set to
(B UTF-8, and the browser can display it correctly. The bean:write will
(B also still escape the characters that need it such as '' and ''. This
(B also means I am not dealing with HTML formatting inside my Java code,
(B and can happily store the same characters in files, databases etc or
(B output to another device instead of HTML.
(B 
(B -- 
(B Jason Lea
(B 
(B 
(B 
(B carlo latasa wrote:
(B 
(B I just checked the example application and did not see anything on Japanese 
(B characters. I'm at:
(B http://localhost:8080/struts-example/tour.do
(B
(BStruts try to choose language encoding according to your browser setting.
(BSo if you are not in Japanese environment, you should change your 
(Bbrowser language.
(B
(BSee 
(B 5. Test it out using a browser that let's you select default languages: 
(Bof
(B http://www.anassina.com/struts/i18n/i18n.html
(B
(BIn this case, you should choose "Japanese[ja]".
(BThen you will see Japanese characters (if your browser has suitable 
(Bfonts).
(B
(B
(BGood luck!
(B
(B
(B
(BYoshinori Ashizawa
(B
(B
(B 
(B Did you mean that if I were to just take this code and modify it to display 
(B these characters? Or is the example somewhere else?
(B 
(B 
(B   
(B 
(B From: [EMAIL PROTECTED]
(B Reply-To: "Struts Users Mailing List" [EMAIL PROTECTED]
(B To: "Struts Users Mailing List" [EMAIL PROTECTED]
(B Subject: Re: i18n with Japanese characters and tags
(B Date: Tue, 23 Mar 2004 16:12:20 +0900
(B 
(B Carlo,
(B 
(B Have you checked the example application included in Struts1.1(or
(B current CVS)? It can show Japanese characters correctly without any
(B special implementations.
(B I think it will be a help for your problem.
(B 
(B The most frequent mistake in such case is lack of unicode escape
(B to their message resource files.
(B Don't forget "native2ascii" when you make your resource files.
(B 
(B see also : http://www.anassina.com/struts/i18n/i18n.html
(B 
(B 
(B Yoshinori Ashizawa
(B Ja-Jakarta Project  www.jajakarta.org
(B 
(B 
(B carlo latasa" [EMAIL PROTECTED] wrote:
(B 
(B 
(B 
(B Hello,
(B 
(B I'm trying to show Japanese characters on my jsp pages however the ""
(B character of the charset is coming back as amp; which is preventing the
(B characters from being displayed correctly. They look like:
(B $B%-%+%9%O(B
(B 
(B Note, the bean:write tag renders the characters correctly when the 
(B   
(B 
(B filter
(B 
(B 
(B attribute is set to "false".
(B 
(B I've got a struts application using both Tomcat and Jrun and I've set my
(B controller element of the struts-c

Re: i18n with Japanese characters and tags....

2004-03-24 Thread carlo latasa
I just checked the example application and did not see anything on Japanese 
characters. I'm at:
http://localhost:8080/struts-example/tour.do

Did you mean that if I were to just take this code and modify it to display 
these characters? Or is the example somewhere else?


From: [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: i18n with Japanese characters and tags
Date: Tue, 23 Mar 2004 16:12:20 +0900
Carlo,

Have you checked the example application included in Struts1.1(or
current CVS)? It can show Japanese characters correctly without any
special implementations.
I think it will be a help for your problem.
The most frequent mistake in such case is lack of unicode escape
to their message resource files.
Don't forget native2ascii when you make your resource files.
see also : http://www.anassina.com/struts/i18n/i18n.html


Yoshinori Ashizawa
Ja-Jakarta Project  www.jajakarta.org
carlo latasa [EMAIL PROTECTED] wrote:

 Hello,

 I'm trying to show Japanese characters on my jsp pages however the 
 character of the charset is coming back as amp; which is preventing the
 characters from being displayed correctly. They look like:
 ƒLƒJƒXƒn

 Note, the bean:write tag renders the characters correctly when the 
filter
 attribute is set to false.

 I've got a struts application using both Tomcat and Jrun and I've set my
 controller element of the struts-config.xml as:

 controller contentType=text/html; charset=JISAutoDetect/

 and at the top of a tiles.jsp that's at the head of every page I've got 
a:

 %@ page contentType=html/text; charset=JISAutoDetect %

 head
   META HTTP-EQUIV=Content-Type CONTENT=text/html; 
charset=JISAutoDetect
 %

 . to set the encoding.

 My hunch is that this is something that Struts is doing to the in the
 RequestProcessor or Controller.
 Could/should I write a Filter to override this issue?

 Is this something I chould set in a .css called in the tiles.jsp?

 Any help is much appreciated.


 Carlo Latasa -

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


Carlo Latasa - Home: (510) 231-9655 Cell: (415) 385-1567

_
MSN Toolbar provides one-click access to Hotmail from any Web page – FREE 
download! http://toolbar.msn.com/go/onm00200413ave/direct/01/

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


Re: i18n with Japanese characters and tags....

2004-03-24 Thread Jason Lea
He was saying it 'can' display Japanese characters. The example doesn't
have any Japanese characters in in (if i remember correctly), but if
they are put into the properties files for the locale they will be
displayed.

You should look into that http://www.anassina.com/struts/i18n/i18n.html
page as it explains a lot.

I think the main problem is you have the Japanese characters already
converted into HTML in your application as yuo have them in the format
#12495;. When you use a bean to write it out, the bean tried to escape
any characters that are significant to HTML, and the '' character is
one of them. That is why it replaces your '' with 'amp;'. The bean is
trying to help by displaying the text you provided in HTML so that it
will appear as #12495; on the page. The 'filter=false' stops it doing
this, but also means if you have some other characters like '' in your
text then they won't be escaped and could cause the page to be rendered
incorrectly.

When I display Japanese characters on my pages I store them in Japanese
in a .properties file, then use native2ascii to convert those japanese
characters into the Java Unicode properties file format of \u. When
java reads them in, the actual unicode character is passed around in
java and output directly into the html page. The page encoding is set to
UTF-8, and the browser can display it correctly. The bean:write will
also still escape the characters that need it such as '' and ''. This
also means I am not dealing with HTML formatting inside my Java code,
and can happily store the same characters in files, databases etc or
output to another device instead of HTML.

-- 
Jason Lea



carlo latasa wrote:

I just checked the example application and did not see anything on Japanese 
characters. I'm at:
http://localhost:8080/struts-example/tour.do

Did you mean that if I were to just take this code and modify it to display 
these characters? Or is the example somewhere else?


  

From: [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: i18n with Japanese characters and tags
Date: Tue, 23 Mar 2004 16:12:20 +0900

Carlo,

Have you checked the example application included in Struts1.1(or
current CVS)? It can show Japanese characters correctly without any
special implementations.
I think it will be a help for your problem.

The most frequent mistake in such case is lack of unicode escape
to their message resource files.
Don't forget native2ascii when you make your resource files.

see also : http://www.anassina.com/struts/i18n/i18n.html


Yoshinori Ashizawa
Ja-Jakarta Project  www.jajakarta.org


carlo latasa [EMAIL PROTECTED] wrote:



Hello,

I'm trying to show Japanese characters on my jsp pages however the 
character of the charset is coming back as amp; which is preventing the
characters from being displayed correctly. They look like:


Note, the bean:write tag renders the characters correctly when the 
  

filter


attribute is set to false.

I've got a struts application using both Tomcat and Jrun and I've set my
controller element of the struts-config.xml as:

controller contentType=text/html; charset=JISAutoDetect/

and at the top of a tiles.jsp that's at the head of every page I've got 
  

a:


%@ page contentType=html/text; charset=JISAutoDetect %

head
  META HTTP-EQUIV=Content-Type CONTENT=text/html; 
  

charset=JISAutoDetect


%

. to set the encoding.

My hunch is that this is something that Struts is doing to the in the
RequestProcessor or Controller.
Could/should I write a Filter to override this issue?

Is this something I chould set in a .css called in the tiles.jsp?

Any help is much appreciated.


Carlo Latasa -
  

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






Carlo Latasa - Home: (510) 231-9655 Cell: (415) 385-1567

_
MSN Toolbar provides one-click access to Hotmail from any Web page FREE 
download! http://toolbar.msn.com/go/onm00200413ave/direct/01/


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


  




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



Re: i18n with Japanese characters and tags....

2004-03-24 Thread carlo latasa
Thanks so much Jason!

I'll try that out when I get a chance. I'm fairly sure that was the first 
thing that I tried but I probably forgot something.

Thanks again-


From: Jason Lea [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: i18n with Japanese characters and tags
Date: Thu, 25 Mar 2004 09:39:40 +1200
He was saying it 'can' display Japanese characters. The example doesn't
have any Japanese characters in in (if i remember correctly), but if
they are put into the properties files for the locale they will be
displayed.
You should look into that http://www.anassina.com/struts/i18n/i18n.html
page as it explains a lot.
I think the main problem is you have the Japanese characters already
converted into HTML in your application as yuo have them in the format
#12495;. When you use a bean to write it out, the bean tried to escape
any characters that are significant to HTML, and the '' character is
one of them. That is why it replaces your '' with 'amp;'. The bean is
trying to help by displaying the text you provided in HTML so that it
will appear as #12495; on the page. The 'filter=false' stops it doing
this, but also means if you have some other characters like '' in your
text then they won't be escaped and could cause the page to be rendered
incorrectly.
When I display Japanese characters on my pages I store them in Japanese
in a .properties file, then use native2ascii to convert those japanese
characters into the Java Unicode properties file format of \u. When
java reads them in, the actual unicode character is passed around in
java and output directly into the html page. The page encoding is set to
UTF-8, and the browser can display it correctly. The bean:write will
also still escape the characters that need it such as '' and ''. This
also means I am not dealing with HTML formatting inside my Java code,
and can happily store the same characters in files, databases etc or
output to another device instead of HTML.
--
Jason Lea


carlo latasa wrote:

I just checked the example application and did not see anything on 
Japanese
characters. I'm at:
http://localhost:8080/struts-example/tour.do

Did you mean that if I were to just take this code and modify it to 
display
these characters? Or is the example somewhere else?




From: [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: Re: i18n with Japanese characters and tags
Date: Tue, 23 Mar 2004 16:12:20 +0900

Carlo,

Have you checked the example application included in Struts1.1(or
current CVS)? It can show Japanese characters correctly without any
special implementations.
I think it will be a help for your problem.

The most frequent mistake in such case is lack of unicode escape
to their message resource files.
Don't forget native2ascii when you make your resource files.

see also : http://www.anassina.com/struts/i18n/i18n.html


Yoshinori Ashizawa
Ja-Jakarta Project  www.jajakarta.org


carlo latasa [EMAIL PROTECTED] wrote:



Hello,

I'm trying to show Japanese characters on my jsp pages however the 
character of the charset is coming back as amp; which is preventing 
the
characters from being displayed correctly. They look like:
ƒLƒJƒXƒn

Note, the bean:write tag renders the characters correctly when the


filter


attribute is set to false.

I've got a struts application using both Tomcat and Jrun and I've set 
my
controller element of the struts-config.xml as:

controller contentType=text/html; charset=JISAutoDetect/

and at the top of a tiles.jsp that's at the head of every page I've got


a:


%@ page contentType=html/text; charset=JISAutoDetect %

head
  META HTTP-EQUIV=Content-Type CONTENT=text/html;


charset=JISAutoDetect


%

. to set the encoding.

My hunch is that this is something that Struts is doing to the in the
RequestProcessor or Controller.
Could/should I write a Filter to override this issue?

Is this something I chould set in a .css called in the tiles.jsp?

Any help is much appreciated.


Carlo Latasa -


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






Carlo Latasa - Home: (510) 231-9655 Cell: (415) 385-1567

_
MSN Toolbar provides one-click access to Hotmail from any Web page EFREE
download! http://toolbar.msn.com/go/onm00200413ave/direct/01/


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







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


Carlo Latasa - Home: (510) 231-9655 Cell: (415) 385-1567

i18n with Japanese characters and tags....

2004-03-22 Thread carlo latasa
Hello,

I'm trying to show Japanese characters on my jsp pages however the  
character of the charset is coming back as amp; which is preventing the 
characters from being displayed correctly. They look like: 
#12461;#12459;#12473;#12495;

Note, the bean:write tag renders the characters correctly when the filter 
attribute is set to false.

I've got a struts application using both Tomcat and Jrun and I've set my 
controller element of the struts-config.xml as:

controller contentType=text/html; charset=JISAutoDetect/

and at the top of a tiles.jsp that's at the head of every page I've got a:

%@ page contentType=html/text; charset=JISAutoDetect %

head
 META HTTP-EQUIV=Content-Type CONTENT=text/html; charset=JISAutoDetect 
%

. to set the encoding.

My hunch is that this is something that Struts is doing to the in the 
RequestProcessor or Controller.
Could/should I write a Filter to override this issue?

Is this something I chould set in a .css called in the tiles.jsp?

Any help is much appreciated.

Carlo Latasa -

_
Find a broadband plan that fits. Great local deals on high-speed Internet 
access. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/

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


RE: i18n with Japanese characters and tags....

2004-03-22 Thread Kumar, Ram S
Hi,
Try
 %
response.setContentType(text/html;charset=JISAutoDetect);
or
response.setContentType(text/html;charset=UTF-8);
%
 in your jsp pages.

Ram Kumar

-Original Message-
From: carlo latasa [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 23, 2004 11:33 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: i18n with Japanese characters and tags

Hello,

I'm trying to show Japanese characters on my jsp pages however the  
character of the charset is coming back as amp; which is preventing the 
characters from being displayed correctly. They look like: 
#12461;#12459;#12473;#12495;

Note, the bean:write tag renders the characters correctly when the filter 
attribute is set to false.

I've got a struts application using both Tomcat and Jrun and I've set my 
controller element of the struts-config.xml as:

controller contentType=text/html; charset=JISAutoDetect/

and at the top of a tiles.jsp that's at the head of every page I've got a:

%@ page contentType=html/text; charset=JISAutoDetect %

head
  META HTTP-EQUIV=Content-Type CONTENT=text/html; charset=JISAutoDetect

%

. to set the encoding.

My hunch is that this is something that Struts is doing to the in the 
RequestProcessor or Controller.
Could/should I write a Filter to override this issue?

Is this something I chould set in a .css called in the tiles.jsp?

Any help is much appreciated.


Carlo Latasa -

_
Find a broadband plan that fits. Great local deals on high-speed Internet 
access. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/


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

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



RE: i18n with Japanese characters and tags....

2004-03-22 Thread carlo latasa
thanks for the message Ram,

I did try that and it had no noticable effect.


From: Kumar, Ram S [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Subject: RE: i18n with Japanese characters and tags
Date: Tue, 23 Mar 2004 00:47:08 -0600
Hi,
Try
 %
response.setContentType(text/html;charset=JISAutoDetect);
or
response.setContentType(text/html;charset=UTF-8);
%
 in your jsp pages.
Ram Kumar

-Original Message-
From: carlo latasa [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 23, 2004 11:33 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: i18n with Japanese characters and tags
Hello,

I'm trying to show Japanese characters on my jsp pages however the 
character of the charset is coming back as amp; which is preventing the
characters from being displayed correctly. They look like:
ƒLƒJƒXƒn
Note, the bean:write tag renders the characters correctly when the filter
attribute is set to false.
I've got a struts application using both Tomcat and Jrun and I've set my
controller element of the struts-config.xml as:
controller contentType=text/html; charset=JISAutoDetect/

and at the top of a tiles.jsp that's at the head of every page I've got a:

%@ page contentType=html/text; charset=JISAutoDetect %

head
  META HTTP-EQUIV=Content-Type CONTENT=text/html; 
charset=JISAutoDetect

%

. to set the encoding.

My hunch is that this is something that Struts is doing to the in the
RequestProcessor or Controller.
Could/should I write a Filter to override this issue?
Is this something I chould set in a .css called in the tiles.jsp?

Any help is much appreciated.

Carlo Latasa -

_
Find a broadband plan that fits. Great local deals on high-speed Internet
access. http://click.atdmt.com/AVE/go/onm00200360ave/direct/01/
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Carlo Latasa - Home: (510) 231-9655 Cell: (415) 385-1567

_
MSN Toolbar provides one-click access to Hotmail from any Web page – FREE 
download! http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/

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


Re: i18n with Japanese characters and tags....

2004-03-22 Thread atchy
Carlo,

Have you checked the example application included in Struts1.1(or 
current CVS)? It can show Japanese characters correctly without any 
special implementations.
I think it will be a help for your problem.

The most frequent mistake in such case is lack of unicode escape 
to their message resource files.
Don't forget native2ascii when you make your resource files.

see also : http://www.anassina.com/struts/i18n/i18n.html


Yoshinori Ashizawa
Ja-Jakarta Project  www.jajakarta.org


carlo latasa [EMAIL PROTECTED] wrote:

 Hello,
 
 I'm trying to show Japanese characters on my jsp pages however the  
 character of the charset is coming back as amp; which is preventing the 
 characters from being displayed correctly. They look like: 
 #12461;#12459;#12473;#12495;
 
 Note, the bean:write tag renders the characters correctly when the filter 
 attribute is set to false.
 
 I've got a struts application using both Tomcat and Jrun and I've set my 
 controller element of the struts-config.xml as:
 
 controller contentType=text/html; charset=JISAutoDetect/
 
 and at the top of a tiles.jsp that's at the head of every page I've got a:
 
 %@ page contentType=html/text; charset=JISAutoDetect %
 
 head
   META HTTP-EQUIV=Content-Type CONTENT=text/html; charset=JISAutoDetect 
 %
 
 . to set the encoding.
 
 My hunch is that this is something that Struts is doing to the in the 
 RequestProcessor or Controller.
 Could/should I write a Filter to override this issue?
 
 Is this something I chould set in a .css called in the tiles.jsp?
 
 Any help is much appreciated.
 
 
 Carlo Latasa -


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