Use java.sql.PreparedStatement for creating and executing your queries.
PreparedStatements are simple to use ; they're like template SQL strings
with ? symbols marking all your changeable values to include in the SQL
statement. After creating the PreparedStatement based on the template, use
its "set...()" methods (such as "setString()", "setInt()") to replace the ?
symbols with your values. This avoids worrying about character encodings,
data formats, and enclosing strings with quotes. However, your JDBC driver
and database must also be able to handle such characters... the Java
language can, but it depends on everything else in your system.
Just try it if you can! You should be able to construct test strings by
using an input method editor, or by creating strings based on Unicode
characters (based on numeric escape codes such as \u1234 if necessary) in
JavaScript or by "pre-filling" your HTML with characters appropriate for
your locale.
-Chris
----- Original Message -----
From: "vivek tiwari" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 16, 2001 5:19 PM
Subject: Internationalization Issue
> I an designing a web page using JSP which has several
> text boxes. It is to be used in both English and
> Chinese locales. So the input can be in Chinese or
> English charset.
>
> Value entered is captured using
> request.getParameter("txtBoxName");
>
> After that it is stored in Oracle database table.
> "Insert into ...." etc.
>
> Do I need to do any special processing for receiving
> and storing input when it is in Chinese?
>
> Do I need to convert the input into unicode before
> storing?
>
> At present my keyboard can only input in English so I
> have no way of testing this application's behaviour
> when Chinese chars are entered .
>
> Can anyone help me on this ?
> Does my form processing servlet/result JSP have to
> change to accomodate this.
>
>
> Thanks for any tips or resources pointing to this.
>
>
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets