Jack Wang wrote:
>
> This is a question of inserting i18n code to database. I placeed this
> question in servlet_users yesterday, again I hope someone help me.
>
> I can select the 16-bit code from the database, but I can not insert the
> 16-bit code to database (Interbase). This seems to be a jdbc or database
> problem . I compile the source with command:
> "javac -encoding GB2321 InsertCC.java ", but painful still is me. give help
> ?

Inserting text into database is not servlet-related problem.
The JDBC driver for your database is responsible for
translating Java 16-bit UNICODE characters to the string representation
used by your database.
I don't know Interbase. But correctly written JDBC driver must
handle string conversions automatically. Ask your database vendor
for support.

The "javac -encoding" flag is used just during compilation
for conversion of non-ascii characters in source code. It has no
effect during runtime.

If your database cannot handle i18n characters, switch to
another database  (postgresql is fine) or try

java -Dfile.encoding=GB2321

for runtime. It may help on some platforms, but is not guaranted ...

Martin
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   INET, a.s.                          Mgr. Martin Kuba
Kralovopolska 139                  e-mail: [EMAIL PROTECTED]
  601 12 Brno                      WWW: http://www.inet.cz/~makub/
 Czech Republic                    tel: +420-5-41242414/33
--------------------------------------------------------------------
PGP fingerprint = D8 57 47 E5 36 D2 C1 A1  C3 48 B2 59 00 58 42 27
 http://wwwkeys.cz.pgp.net:11371/pks/lookup?op=index&search=makub
--------------------------------------------------------------------

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to