Re: Help needed with Tomcat support for Double Byte Chars

2002-11-25 Thread Joel Rees
 Hi,
 We are using Tomcat3.3.1 and Oracle on Linux.
 When we enter DoubleByte Chars (CJK, GB2312) in jsp form input, Tomcat 
 turns the characters into 's.
 
 The only way we can get around this problem now is to set the IE browser to 
 check the temporary files everytime.

I think I've seen this on the list, quite recently, in fact. Check the
archives. Look for internationalization and multilingual and words
like properties. (In fact, I think there is a relevant current thread.)

You can find archives through the apache/jakarta site. I bookmarked marc
(http://marc.theaimsgroup.com, don't remember if tomcat-user is in the
jakarta group or the java group) but there are others, too.

(Sorry to not be much help today.)

-- 
Joel Rees [EMAIL PROTECTED]


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




Re: Help needed with Tomcat support for Double Byte Chars

2002-11-25 Thread Stephen Riek

There are so many possible reasons for this. My advice,
1. Check that the data you send is being received as GB2312 or whatever. 
Easiest way to do this is to write it out to a text file. See the 
Discrepancies...
thread for my code to do just this.
2. Also in the Discrepancies thread, you'll probably find that the data is received
   as iso-1889_1 and stored in the database as such. 
3. Extracting from the database, you may need to do this,
  try {
   field1 = new String(rs.getBytes(field1), gb2312);
  }
  catch(java.io.UnsupportedEncodingException e) {
  field1 = rs.getString(field1);
  }
Hope that puts you in the right direction.
Stephen.
 Joel Rees [EMAIL PROTECTED] wrote: Hi,
 We are using Tomcat3.3.1 and Oracle on Linux.
 When we enter DoubleByte Chars (CJK, GB2312) in jsp form input, Tomcat 
 turns the characters into 's.
 
 The only way we can get around this problem now is to set the IE browser to 
 check the temporary files everytime.

I think I've seen this on the list, quite recently, in fact. Check the
archives. Look for internationalization and multilingual and words
like properties. (In fact, I think there is a relevant current thread.)

You can find archives through the apache/jakarta site. I bookmarked marc
(http://marc.theaimsgroup.com, don't remember if tomcat-user is in the
jakarta group or the java group) but there are others, too.

(Sorry to not be much help today.)

-- 
Joel Rees 


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 




-
With Yahoo! Mail you can get a bigger mailbox -- choose a size that fits your needs



Re: Help needed with Tomcat support for Double Byte Chars

2002-11-25 Thread Bill Barker
The charset support in 3.3.1 is actually very amazing, given the limitations
of the Servlet 2.2 Spec (the principal author is an iso-latin-2 person).

Firstly, Tomcat 3.3.1 will attempt to remember the last charset (in the
session) that was used for the last output page.  Since almost all browsers
will send back parameters using this encodings, this works in 99/100 cases.
When this fails, you can set the request attribute:
request.setAttribute(charset, GB2312) before the request parameters are
parsed. (This works the same way as the 2.3 Spec
'request.setCharacterEncoding').

John Z Yang [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Hi,
 We are using Tomcat3.3.1 and Oracle on Linux.
 When we enter DoubleByte Chars (CJK, GB2312) in jsp form input, Tomcat
 turns the characters into 's.

 The only way we can get around this problem now is to set the IE browser
to
 check the temporary files everytime.

 Does anyone knows how to fix this problem?

 Many thanks.

 John





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