pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
localization, encoding problem
3+ messages / 2 participants
[nested] [flat]

* localization, encoding problem
@ 2006-05-23 11:37 j n <jneuschld@gmail.com>
  2006-05-23 14:55 ` Fwd: localization, encoding problem j n <jneuschld@gmail.com>
  2006-05-23 18:26 ` Re: localization, encoding problem Ivo Rossacher <rossacher@bluewin.ch>
  0 siblings, 2 replies; 3+ messages in thread

From: j n @ 2006-05-23 11:37 UTC (permalink / raw)
  To: pgsql-admin

Hellou all

i have a problem to convert data from utf8 to ascii. My localization is
slovakia and we use characters like
'á é š ť' and so on. But many times it is the same if u use 'á' or 'a'. Som
I need to translate theese special characters. Somebody told me to use
function to_ascii() but this function throws me an error : not supported
encoding to ascii.

OS  : debian
PostgreSQL : 8.1.3
configured with --enable-multibyte=UTF8

please help
thanx


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Fwd: localization, encoding problem
  2006-05-23 11:37 localization, encoding problem j n <jneuschld@gmail.com>
@ 2006-05-23 14:55 ` j n <jneuschld@gmail.com>
  1 sibling, 0 replies; 3+ messages in thread

From: j n @ 2006-05-23 14:55 UTC (permalink / raw)
  To: pgsql-admin

 Hellou all

i have a problem to convert data from utf8 to ascii.
I'm from slovakia and we use special characters like 'á é š ť' and so on.
But many times it is the same if u use 'á' or 'a'. So I need to translate
these special characters. Somebody told me to use function to_ascii() but
this function throws me an error : not supported encoding. There is about 50
characters that i need translate.

OS  : debian
PostgreSQL : 8.1.3
configured with --enable-multibyte=UTF8

please help
thanx


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: localization, encoding problem
  2006-05-23 11:37 localization, encoding problem j n <jneuschld@gmail.com>
@ 2006-05-23 18:26 ` Ivo Rossacher <rossacher@bluewin.ch>
  1 sibling, 0 replies; 3+ messages in thread

From: Ivo Rossacher @ 2006-05-23 18:26 UTC (permalink / raw)
  To: pgsql-admin; +Cc: j n <jneuschld@gmail.com>

I think first you need to be aware about the nature of the ASCII encoding 
within the postgresql server. ASCII encoding means that there is no encoding 
at all. So it would be the full responsibility of the client applications to 
store and read consistent encodings. Therefore it is clear that the server 
can not know what he should convert to within the function to_ascii() in this 
case.

Second what fore do you need to convert? If you need the conversion for client 
readings you only have to set the desired encoding for the client by
SET client_encoding = '[desired encoding]';
when you open the conncetion to the server. With this setting the server will 
convert the texts to the client encoding for you.

If you need to change the 'á' to 'a' you most probably need to write a 
function (encoding) which does it for you. However this seems to be a 
extreemly wirred operation which most possibly should be solved within the 
client (by allowing this special charaters or converting them directly before 
inserting them into the database), then within the server.

In the chapter 20.2. Character Set Support in the manual you can find more 
details about this issues.

Best regards
Ivo Rossacher

Am Dienstag, 23. Mai 2006 13.37 schrieb j n:
> Hellou all
>
> i have a problem to convert data from utf8 to ascii. My localization is
> slovakia and we use characters like
> 'á é š ť' and so on. But many times it is the same if u use 'á' or 'a'. Som
> I need to translate theese special characters. Somebody told me to use
> function to_ascii() but this function throws me an error : not supported
> encoding to ascii.
>
> OS  : debian
> PostgreSQL : 8.1.3
> configured with --enable-multibyte=UTF8
>
> please help
> thanx



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2006-05-23 18:26 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-05-23 11:37 localization, encoding problem j n <jneuschld@gmail.com>
2006-05-23 14:55 ` j n <jneuschld@gmail.com>
2006-05-23 18:26 ` Ivo Rossacher <rossacher@bluewin.ch>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox