You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Łukasz Kaleta <lu...@gmail.com> on 2008/05/02 12:40:49 UTC

Encoding problem

Hi,

I have problem with getting data from derby database with correct encoding.

I try:
CONNECT 'jdbc:derby:C:\Workspace\IDEA\Prescription\dbtest;create=true;territory=pl_PL;

CREATE TABLE ....

when I read data from created table in ij everythink is ok, but when I
get data from java.sql.ResultSet I can't reach correct polish chars?
Waht can be the reason of that? What should I do to get correct chars?

-- 

Pozdrawiam
Łukasz Kaleta

Re: Encoding problem

Posted by Stanley Bradbury <St...@gmail.com>.
Łukasz Kaleta wrote:
> Hi,
>
> I have problem with getting data from derby database with correct encoding.
>
> I try:
> CONNECT 'jdbc:derby:C:\Workspace\IDEA\Prescription\dbtest;create=true;territory=pl_PL;
>
> CREATE TABLE ....
>
> when I read data from created table in ij everythink is ok, but when I
> get data from java.sql.ResultSet I can't reach correct polish chars?
> Waht can be the reason of that? What should I do to get correct chars?
>
>   
Hi -
It might be your default locale - If the default locale of your JVM is 
not pl_PL (reported by java.util.Locale.getDefault() ) you will need to 
override this by setting user.language and user.region when starting 
your JDBC program so that java properly displays the characters.

e.g:  java -Duser.language=pl -Duser.region=PL  myProg




Re: Encoding problem

Posted by Rick Hillegas <Ri...@Sun.COM>.
Hi Łukasz,

Can you give us some more information on what you can do in ij but not 
in your own Java client? Samples of the successful and unsuccessful code 
might help us better  understand what's not working for you.

Thanks,
-Rick

Łukasz Kaleta wrote:
> Hi,
>
> I have problem with getting data from derby database with correct encoding.
>
> I try:
> CONNECT 'jdbc:derby:C:\Workspace\IDEA\Prescription\dbtest;create=true;territory=pl_PL;
>
> CREATE TABLE ....
>
> when I read data from created table in ij everythink is ok, but when I
> get data from java.sql.ResultSet I can't reach correct polish chars?
> Waht can be the reason of that? What should I do to get correct chars?
>
>