Re: Japanese Characters in JSP's

2003-08-14 Thread Bill Barker
I don't know why cp1251 et. al. work (probably they are single-byte
encodings, and shift_jis is multi-byte).

However, try adding:
 [EMAIL PROTECTED] contentType=text/html; charset=shift_jis % to your page.  This
will tell Tomcat that the Writer should use shift_jis as it's encoding.
Since you can see the page as a .html file, you shouldn't need [EMAIL PROTECTED]
pageEncoding=shift_jis %, but if you ever save the file as shift_jis,
then you will need this directive as well.

Fred Whipple [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Thank you, Punam, for the suggestion -- However this is already
 specified both in the HTML file, and my browser is setup and capable of
 viewing x-sjis.  This is illustrated by the fact that the exact same
 file works perfectly under Tomcat so long as its file extension is .html
 and not .jsp.  Only when Tomcat tries to compile the file into a Servlet
 does it give me any trouble.

 -Fred

  Hi Fred,
 
  In the html header u will have to set the char set as SHIFT
  JIS. And in the
  browser SHIFT JIS should be set.
 
 
  Regards,
  Punam




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



RE: Japanese Characters in JSP's

2003-08-11 Thread Punam Mutha
Hi Fred,

In the html header u will have to set the char set as SHIFT JIS. And in the
browser SHIFT JIS should be set.


Regards,
Punam


-Original Message-
From: Fred Whipple [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 10, 2003 8:01 PM
To: [EMAIL PROTECTED]
Subject: Japanese Characters in JSP's


Hi All,

I'm having a bit of trouble with getting JSP's with Japanese characters
within them.  I'm working with a Windows XP system with JDK 1.4.2 and Tomcat
4.1.24.  The problem seems persistent, though, on RH Linux with JDK 1.4.1_03
as well.  I have no problem with Russian, Arabic, Hebrew, and other
non-Latin-1 character sets, just Japanese (so far).

More confusing, my test file is a very simple HTML document that Tomcat
services properly when I'm simply calling it as an HTML file, such as:

http://localhost:8080/testfile.html

All I do is rename it to testfile.jsp, and it comes out all garbled.  I've
done the same test with a myriad of HTML files with various character sets
including cp1251, iso8859-5, etc.  Everything works fine except for
Japanese -- I believe my file uses Shift_JIS.  I don't have test files for
other multi-byte character sets so I've no idea if it's exclusive to
Japanese or if, for example, Chinese would not work either.

I've also tried adding response.setLocale (new java.util.Locale (ja)) to
the top of the page; it made no difference.  I've also tried reading
everything I could find, and I'm empty handed.  This seems like it shouldn't
be quite as difficult as it is.

TIA!

-Fred


-
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: Japanese Characters in JSP's

2003-08-11 Thread Fred Whipple
Thank you, Punam, for the suggestion -- However this is already
specified both in the HTML file, and my browser is setup and capable of
viewing x-sjis.  This is illustrated by the fact that the exact same
file works perfectly under Tomcat so long as its file extension is .html
and not .jsp.  Only when Tomcat tries to compile the file into a Servlet
does it give me any trouble.

-Fred

 Hi Fred,
 
 In the html header u will have to set the char set as SHIFT 
 JIS. And in the
 browser SHIFT JIS should be set.
 
 
 Regards,
 Punam


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



RE: Japanese Characters in JSP's

2003-08-11 Thread Punam Mutha
Hi Fred,

Then you must try the -encoding option of java.exe in configuration file of
tomcat.
Also you  can try setting the encoding type to ISO 8859 1.

Regards,
Punam


-Original Message-
From: Fred Whipple [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 10, 2003 11:30 PM
To: 'Tomcat Users List'
Subject: RE: Japanese Characters in JSP's


Thank you, Punam, for the suggestion -- However this is already
specified both in the HTML file, and my browser is setup and capable of
viewing x-sjis.  This is illustrated by the fact that the exact same
file works perfectly under Tomcat so long as its file extension is .html
and not .jsp.  Only when Tomcat tries to compile the file into a Servlet
does it give me any trouble.

-Fred

 Hi Fred,

 In the html header u will have to set the char set as SHIFT
 JIS. And in the
 browser SHIFT JIS should be set.


 Regards,
 Punam


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