Re: BUG #4336: Strange behaviour for to_ascii

From: "Pavel Stehule" <pavel(dot)stehule(at)gmail(dot)com>
To: "Maxime Carbonneau" <manitou(at)maikan(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4336: Strange behaviour for to_ascii
Date: 2008-07-31 09:27:01
Message-ID: 162867790807310227p3e7c7fb9o827f69b0e479cd7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hello

it's bug,

for this moment, please, try:

CREATE FUNCTION to_ascii(bytea, name)
RETURNS text AS 'to_ascii_encname' LANGUAGE internal;

postgres=# CREATE FUNCTION to_ascii(bytea, name)
postgres-# RETURNS text AS 'to_ascii_encname' LANGUAGE internal;
CREATE FUNCTION
postgres=#
postgres=# SELECT to_ascii(convert_to('Příliš žlutý kůň', 'latin2'),'latin2');
to_ascii
------------------
Prilis zluty kun
(1 row)

postgres=# SELECT
to_ascii(convert_to('école','LATIN9'),'LATIN9');
to_ascii
----------
ecole
(1 row)

Regards
Pavel Stehule

2008/7/30 Maxime Carbonneau <manitou(at)maikan(dot)com>:
>
> The following bug has been logged online:
>
> Bug reference: 4336
> Logged by: Maxime Carbonneau
> Email address: manitou(at)maikan(dot)com
> PostgreSQL version: 8.3.3
> Operating system: Mac OS X 10.5.4
> Description: Strange behaviour for to_ascii
> Details:
>
> With PostgreSQL 8.2.5, I used to_ascii to remove accents:
> SELECT TO_ASCII(CONVERT('école' USING utf8_to_iso_8859_15), 'latin9');
> => ecole
> With PostgreSQL 8.3.3, I had to made some changes since convert using is
> gone. I'm using: SELECT
> to_ascii(encode(convert_to('école','LATIN9'),'escape'),'LATIN9');
> but the result is
> => \351cole
>
> How can I remove accent letter with PostgreSQL 8.3.3?
>
> --
> Sent via pgsql-bugs mailing list (pgsql-bugs(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-bugs
>

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message none 2008-07-31 16:16:23 BUG #4337: psql -c case insensitive
Previous Message Craig Ringer 2008-07-31 01:11:05 Re: BUG #4335: Error w/ PostgreSQL & EnterpriseDB Stack Builder