Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Databases > Re: Encoding co...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 25 of 27 Topic 3647 of 3876
Post > Topic >>

Re: Encoding conversion problem

by Lew <lew@[EMAIL PROTECTED] > Feb 15, 2008 at 10:00 AM

Andrea wrote:
> Hi Sabine,
>> I'm guessing, but maybe if the databse tells the JDBC driver it's
>> ISO-8859-1 *and* your application tells it the same encoding, it won't
>> bother trying to transform anything...
> Yes that's what I was thinking too... but I tried to change the
> encoding of the JVM (tried Cp850, ...) but it keeps on working...
> 
> Hi Lew,
>>> I was thinking only about the DB encoding while the problem is mainly
>>> in the JVM encoding (now it's clear to me that Java can't handle
>>> characters outside the encoding of the JVM, I wasn't thinking about
>>> it, sorry...).
>> "The encoding of the JVM" is Unicode-16 with surrogate pairs; every
Unicode
>> character is representable in the JVM, including the Euro character. 
There is
>> no Unicode character that the JVM cannot represent.
> With "encoding of the JVM" I was referring to the file.encoding
> property used by the JVM. If the JVM runs with:
> - ISO-8859-1 then I can't read or write the EURO character to DB (it
> becomes garbage) and ISO-8859-1 doesn't include that character;
> - Cp1252 then I can read and write the EURO character to DB and Cp1252
> includes that character.

I uinderstand my confusion now - it stemmed from the phrase "the encoding
of 
the JVM".  The JVM itself only uses one encoding; it translates to and
from 
other encoding on I/O.  So to make sure I understood you correctly, were
you 
referring to the encoding specified by the I/O call?

Generally if the encoding you specify for I/O is different from the
encoding 
in your data store, it will cause trouble.  This is not limited to Java. 
Over 
in the Postgres newsgroups one finds people have trouble with character 
encoding from all sorts of platforms, mostly stemming from trying to store

characters in a column that are not part of the specified character
encoding 
for the DB.  If such things don't match, then problems will hatch.

-- 
Lew
 




 27 Posts in Topic:
Encoding conversion problem
Andrea <tol7481@[EMAIL  2008-02-11 04:03:47 
Re: Encoding conversion problem
Lothar Kimmeringer <ne  2008-02-12 08:13:28 
Re: Encoding conversion problem
Andrea <tol7481@[EMAIL  2008-02-12 00:25:51 
Re: Encoding conversion problem
Lothar Kimmeringer <ne  2008-02-14 20:11:04 
Re: Encoding conversion problem
Sabine Dinis Blochberger   2008-02-12 09:33:03 
Re: Encoding conversion problem
Andrea <tol7481@[EMAIL  2008-02-12 03:22:17 
Re: Encoding conversion problem
Sabine Dinis Blochberger   2008-02-12 13:02:17 
Re: Encoding conversion problem
Andrea <tol7481@[EMAIL  2008-02-12 06:33:21 
Re: Encoding conversion problem
Roedy Green <see_websi  2008-02-12 18:07:31 
Re: Encoding conversion problem
Roedy Green <see_websi  2008-02-12 18:10:54 
Re: Encoding conversion problem
Andrea <tol7481@[EMAIL  2008-02-13 03:22:16 
Re: Encoding conversion problem
Silvio Bierman <sbierm  2008-02-13 12:36:49 
Re: Encoding conversion problem
Silvio Bierman <sbierm  2008-02-13 12:48:33 
Re: Encoding conversion problem
Andrea <tol7481@[EMAIL  2008-02-13 06:22:22 
Re: Encoding conversion problem
Silvio Bierman <sbierm  2008-02-13 16:39:59 
Re: Encoding conversion problem
Roedy Green <see_websi  2008-02-13 16:38:17 
Re: Encoding conversion problem
Roedy Green <see_websi  2008-02-13 16:36:07 
Re: Encoding conversion problem
Andrea <tol7481@[EMAIL  2008-02-13 07:28:19 
Re: Encoding conversion problem
Andrea <tol7481@[EMAIL  2008-02-14 08:00:45 
Re: Encoding conversion problem
Silvio Bierman <sbierm  2008-02-14 21:44:14 
Re: Encoding conversion problem
Andrea <tol7481@[EMAIL  2008-02-15 03:26:40 
Re: Encoding conversion problem
Lew <lew@[EMAIL PROTEC  2008-02-15 08:10:47 
Re: Encoding conversion problem
Sabine Dinis Blochberger   2008-02-15 12:02:46 
Re: Encoding conversion problem
Andrea <tol7481@[EMAIL  2008-02-15 06:51:52 
Re: Encoding conversion problem
Lew <lew@[EMAIL PROTEC  2008-02-15 10:00:01 
Re: Encoding conversion problem
Andrea <tol7481@[EMAIL  2008-02-15 09:02:46 
Re: Encoding conversion problem
Silvio Bierman <sbierm  2008-02-15 18:16:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Dec 3 23:32:37 CST 2008.