Slightly off-topic but similarly - tomcat does have a problem with
multi-byte characters.
If you try to browse a file system via tomcat on a Kanji or Chinese
language
system you'll get a 'not an ISO-8859_1' character exception from tomcat if
any of the filenames
contain multi-byte characters.
It seems to be related to the workaround in the following code:
[\src\share\org\apache\tomcat\core\BufferedServletOutputStream.java]--
public void print(String s) throws IOException {
if (s==null) s="null";
int len = s.length();
for (int i = 0; i < len; i++) {
char c = s.charAt (i);
//
// XXX NOTE: This is clearly incorrect for many strings,
// but is the only consistent approach within the current
// servlet framework. It must suffice until servlet output
// streams properly encode their output.
//
if ((c & 0xff00) != 0) { // high order byte must be zero
String errMsg = sm.getString(
"servletOutputStreamImpl.fmt.not_iso8859_1",
new Object[] {new Character(c)});
throw new IOException(errMsg);
}
write(c);
}
}
True, it isn't related to this problem, but it does demonstrate a problem
that tomcat has with multi-byte characters.
What is tomcat's position on multi-byte chars in general and, how could I
work around this restriction.
Kitching Simon wrote:
> I think the most likely cause is that it is your SQL
> statement that is throwing an exception when you
> try to insert non-ascii characters into a text column
> in the database.
>
> Java text is all based on UNICODE, so it is unlikely
> that tomcat has any problems at all with special
> characters.
>
> So the point for *you* to check is whether your
> SQL is being run, and if so whether it is throwing
> an exception.
>
> If you can confirm that your SQL is not being
> run at all (ie that the problem *is* somewhere in
> tomcat) then I suggest you post again.
>
> > -----Original Message-----
> > From: Andr� Alves [SMTP:[EMAIL PROTECTED]]
> > Sent: Thursday, January 04, 2001 6:34 PM
> > To: [EMAIL PROTECTED]
> > Subject: charset problem
> >
> > Hi,
> > I'm using apache 1.3.9, tomcat 3.2.1 and NT 4 SP 5.
> > When I pass words with special characters like parameter to tomcat,
> > to be inserted in a data base, the insert don't occurs. I would like
> > know if exists any configuration to tomcat accept words with special
> > characters, like "Andr�" or "Jo�o".
> >
> > Thanks
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Photos - Share your holiday photos online!
> > http://photos.yahoo.com/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, email: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]