Thank you all VERY much with this. It is 8:30pm here and I'm close to
another 12 hour day trying at this problem.
I don't understand why the browser still insists on sending the data as
ISO-8859-1 if the header of the page and the accept-encoding tag on the form
both explicitly specify UTF-8 ?? Bizarre ;-8
Anyway, thanks a million again to:
Jeff Guttadauro
and
THG.
Andoni.
----- Original Message -----
From: "THG" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, February 17, 2003 8:14 PM
Subject: Re: UTF-8 Sending Euro symbol to Servlet in Form data.
> try the following code snippet:
>
>
> String value = "<String from your form>";
> try
> {
> value = new String(value.getBytes("ISO-8859-1"), "UTF-8")
> }
> catch (Exception ex) {}
>
> Then write the value (i. e. with a PreparedStatement) to the db.
>
> On Mon, 17 Feb 2003 19:56:54
> Andoni wrote:
> >Actually the prepared statements couldn't help as I can get the Euro
symbol
> >into the database fine by hard-coding it into my statement. It is only
> >getting the information **from the form to the servlet** that is having a
> >problem.
> >
> >
> >
> >Andoni.
> >
> >
> >----- Original Message -----
> >From: "THG" <[EMAIL PROTECTED]>
> >To: "Tomcat Users List" <[EMAIL PROTECTED]>
> >Sent: Monday, February 17, 2003 7:42 PM
> >Subject: Re: UTF-8 Sending to Database.
> >
> >
> >> It could be, that the form data is double encoded or
> >> the jdbc driver automatically encoding the data on the
> >> fly. do u use prepared statements (setString())?
> >>
> >> what is the encoding of your dbms?
> >>
> >> On Mon, 17 Feb 2003 19:22:55
> >> Andoni wrote:
> >> >Hello,
> >> >
> >> >I am trying to send a Euro symbol ( ? ) to my database but it keeps
> >being
> >> >corrupted on the way to the servlet from the form on my page.
> >> >
> >> >When I replace the SQL string in my servlet with one which has a Euro
> >symbol
> >> >hard-coded it works fine and displays in my .jsp fine as the Euro
symbol
> >but
> >> >when I submit a form from my JSP with a Euro symbol it gets corrupted
> >into
> >> >nonsense on the way to the servlet.
> >> >
> >> >Can anyone please help??
> >> >
> >> >Thanks,
> >> >
> >> >Andoni.
> >> >
> >> >
> >> >---------------------------------------------------------------------
> >> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> >For additional commands, e-mail: [EMAIL PROTECTED]
> >> >
> >> >
> >>
> >>
> >> _____________________________________________________________
> >> Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
> >> http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
> >>
> >> ---------------------------------------------------------------------
> >> 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]
> >
> >
>
>
> _____________________________________________________________
> Get 25MB, POP3, Spam Filtering with LYCOS MAIL PLUS for $19.95/year.
> http://login.mail.lycos.com/brandPage.shtml?pageId=plus&ref=lmtplus
>
> ---------------------------------------------------------------------
> 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]