dbTalk Databases Forums  

Conversions charsets

comp.databases.postgresql comp.databases.postgresql


Discuss Conversions charsets in the comp.databases.postgresql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Alain Reymond
 
Posts: n/a

Default Conversions charsets - 01-19-2012 , 04:05 AM






Hello,

We gave a Postgres 8.4 database running under Linux Centos 5.4 and
defined so :

ENCODING = 'SQL_ASCII'
TABLESPACE = pg_default
LC_COLLATE = 'fr_FR.UTF-8'
LC_CTYPE = 'fr_FR.UTF-8'
CONNECTION LIMIT = -1;

Accessing under Linux is no problem but when we merge addresses under
Windows using f.e. Winword an address like 'Résidence Les Cčdres, bt. H"
becomes : " R‚sidence Les CŠdres, bƒt H " and I can't see how to
interface correctly the two systems.

If you have an idea, I would be grateful.

Regards,

Alain

Reply With Quote
  #2  
Old   
Fredrik Jonson
 
Posts: n/a

Default Re: Conversions charsets - 01-19-2012 , 04:34 AM






In <4f17eae9$0$5045$ba620e4c (AT) news (DOT) skynet.be> Alain Reymond wrote:

Quote:
We gave a Postgres 8.4 database running under Linux Centos 5.4 and
defined so:

ENCODING = 'SQL_ASCII', LC_CTYPE = 'fr_FR.UTF-8'
The postgresql manual advices against using SQL_ASCII as encoding when
storing data that isn't limited to ASCII, and especially so when using a
LC_CTYPE not limited to ASCII.

http://www.postgresql.org/docs/8.4/s...multibyte.html

Quote:
Accessing under Linux is no problem but when we merge addresses under
Windows using f.e. Winword an address like 'Résidence Les Cèdres, bt. H"
becomes : " R‚sidence Les CŠdres, bƒt H ".
You probably want to look at adjusting the client encoding in whatever
client software or database driver your using on the client system. Word
probably make implicit assumptions about what character encoding is used for
the indata.

With psql you can check and set the client encoding with the command
\encoding or from the environment variable PGCLIENTENCODING. Example...

$ PGCLIENTENCODING=UTF-8 psql foodb -c "select * from foo;" -o foo-utf
$ file foo-utf
foo-utf: UTF-8 Unicode text

$ PGCLIENTENCODING="ISO 8859-1" psql foodb -c "select * from foo;" -o foo-iso
$ file foo-iso
foo-iso: ISO-8859 text

--
Fredrik Jonson

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



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.