Unix Technical Forum

Re: Usind database with encoding UNICODE and vovel

This is a discussion on Re: Usind database with encoding UNICODE and vovel within the pgsql Interfaces odbc forums, part of the PostgreSQL category; --> > -----Original Message----- > From: Andreas Pflug [mailto gadmin@pse-consulting.de] > Sent: 03 August 2005 09:28 > To: Josef Springer ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Interfaces odbc

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-16-2008, 01:18 AM
Dave Page
 
Posts: n/a
Default Re: Usind database with encoding UNICODE and vovel



> -----Original Message-----
> From: Andreas Pflug [mailtogadmin@pse-consulting.de]
> Sent: 03 August 2005 09:28
> To: Josef Springer
> Cc: pgsql-odbc@postgresql.org; Dave Page
> Subject: Re: [ODBC] Usind database with encoding UNICODE and vovel
>
> Josef Springer wrote:
> > Hi anybody,
> >
> > Encironment: Win2k, german locale, PostgreSQL database with UNICODE
> > encoding, using via ODBC
> > Client encoding UNICODE.
> >
> > I can read strings containing vovels without problems, But writing
> > strings containing vovels does not work !
> > Can anybody assist ?

>
> I've been posting a patch earlier this year (January) because
> I had the
> same problem on Unicode databases. But this is not the
> ultimate patch;
> it will create data errors with non-unicode databases (e.g.
> Latin-1).


OK, well as you know Andreas, my unicode/locale etc. experience is
pretty much limited to what I've learnt from you and Hiroshi Saito on
pgAdmin, however, I'm on a roll fixing bugs in psqlODBC at the moment,
so let's try to sort this :-)

> I wonder if the odbc driver changes the client encoding to
> unicode, as it
> should when connecting to non-ASCII databases.


No it doesn't but it seems a pretty major thing for Hiroshi (Inoue) to
have missed when he wrote the Unicode support, so I suspect he had some
reason for not doing so at the time

You (or Josef) can do this manually though for testing - in the driver
setup for the DSN, click on DataSource, then on 'Page 2'. Add the
following query to the connect settings box, and OK all the dialogues.

SET client_encoding TO 'unicode'

Then, try it out and let us know what happens!

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-16-2008, 01:19 AM
Andreas Pflug
 
Posts: n/a
Default Re: Usind database with encoding UNICODE and vovel

Dave Page wrote:
>
>
>
>>-----Original Message-----
>>From: Andreas Pflug [mailtogadmin@pse-consulting.de]
>>Sent: 03 August 2005 09:28
>>To: Josef Springer
>>Cc: pgsql-odbc@postgresql.org; Dave Page
>>Subject: Re: [ODBC] Usind database with encoding UNICODE and vovel
>>
>>Josef Springer wrote:
>>
>>>Hi anybody,
>>>
>>>Encironment: Win2k, german locale, PostgreSQL database with UNICODE
>>>encoding, using via ODBC
>>> Client encoding UNICODE.
>>>
>>>I can read strings containing vovels without problems, But writing
>>>strings containing vovels does not work !
>>>Can anybody assist ?

>>
>>I've been posting a patch earlier this year (January) because
>>I had the
>>same problem on Unicode databases. But this is not the
>>ultimate patch;
>>it will create data errors with non-unicode databases (e.g.
>>Latin-1).

>
>
> OK, well as you know Andreas, my unicode/locale etc. experience is
> pretty much limited to what I've learnt from you and Hiroshi Saito on
> pgAdmin, however, I'm on a roll fixing bugs in psqlODBC at the moment,
> so let's try to sort this :-)


Sadly I don't even have the time to follow this threas thorougly.
IMHO the current pgadmin behaviour should be workable for all situations
(unless data isn't really stored in the encoding as the server encoding
states):

Client encoding is set to UNICODE automatically for all server encodings
excluding SQL_ASCII and MULE_INTERNAL, because for all other encodings
proper conversions exist. For SQL_ASCII and MULE_INTERNAL these are used
as client encoding too, hoping the app knows what to do.

In case the server encoding is wrong, the client will have to have to
play with client encoding itself. In this case, the driver shouldn't try
to do conversions itself, but leave as much as possible to the client.

Regards,
Andreas

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:35 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com