Re: problem with to_ascii() function in version 8.3.3

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: Pavel Arnošt *EXTERN* <id9848949(at)gmail(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: problem with to_ascii() function in version 8.3.3
Date: 2008-06-17 12:09:50
Message-ID: D960CB61B694CF459DCFB4B0128514C20235EB4A@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Pavel Arnošt wrote:
> i have a problem with to_ascii() function in version 8.3.3. I have read Mr. Gonzales's post at
> http://groups.google.com/group/pgsql.general/browse_thread/thread/f74650e3b3248ff0/9f36fb072ea1dc98?lnk=gst&q=to_ascii#9f36fb072ea1dc98
> and he managed to use to_ascii function with following command
> sequence:
>
> create table chartest ( c text);
> insert into chartest (c) values ('á');
> select to_ascii(encode(convert_to(c,'LATIN9'),'escape'),'LATIN9') from
> chartest;
>
> His output was:
>
> to_ascii
> ----------
> a
>
> but i'm getting:
>
> to_ascii
> ----------
> \341
>
> What am I doing wrong? How to_ascii function should be used?

What answer do you get to the following two SQL statements:

SHOW server_encoding;
SHOW client_encoding;

Maybe that will help to understand.

Yours,
Laurenz Albe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message m laks 2008-06-17 12:10:01 Re: ERROR: missing FROM-clause entry for table on postgresql 8.1 not on 7.4; deleting from a join
Previous Message m laks 2008-06-17 12:03:07 Re: ERROR: missing FROM-clause entry for table on postgresql 8.1 not on 7.4; deleting from a join