Re: Encoding conversion problem
- From: Lothar Kimmeringer <news200709@xxxxxxxxxxxxxx>
- Date: Tue, 12 Feb 2008 08:13:28 +0100
Andrea wrote:
I have a J2EE application which connects to a DB2 configured with code
set IBM-850. The application works with encoding ISO-8859-1.
In general the JDBC-driver is aware of the encoding, the database
is using and is doing the conversion already if you access the
column by getString(columnName/index).
I tried encoding conversions with InputStreamReader and
OutputStreamWriter:
...
BufferedReader reader = new BufferedReader(new
InputStreamReader(source, "IBM850"));
What is source? How do you create that from the JDBC-
resultset?
BufferedWriter writer = new BufferedWriter(new
OutputStreamWriter(output, "ISO-8859-1"));
That looks OK.
Regards, Lothar
--
Lothar Kimmeringer E-Mail: spamfang@xxxxxxxxxxxxxx
PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)
Always remember: The answer is forty-two, there can only be wrong
questions!
.
- Follow-Ups:
- Re: Encoding conversion problem
- From: Andrea
- Re: Encoding conversion problem
- References:
- Encoding conversion problem
- From: Andrea
- Encoding conversion problem
- Prev by Date: 請問
- Next by Date: Re: Encoding conversion problem
- Previous by thread: Encoding conversion problem
- Next by thread: Re: Encoding conversion problem
- Index(es):
Relevant Pages
|
|