Re: character 0xe29986 of encoding "UTF8" has no equivalent in "LATIN2"

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Andreas Kalsch <andreaskalsch(at)gmx(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: character 0xe29986 of encoding "UTF8" has no equivalent in "LATIN2"
Date: 2009-08-03 19:33:05
Message-ID: 162867790908031233t561cd7acg70338679153e992e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2009/8/3 Andreas Kalsch <andreaskalsch(at)gmx(dot)de>:
> The function "convert_to(string text, dest_encoding name)" will throw an
> error and so break my application when not supported characters are included
> in the unicode string.
> So what can I do
> - to filter characters out which have no counterpart in the latin codesets
> - or to simple ignore wrong characters?
>
> Problem: Users will enter _any_ characters in my application and an error
> really doesn't help in this case.
>
> What I am searching for is a function to undiacritic special letters to
> simple ones.
>
> There is provided an example -
> http://www.postgres.cz/index.php/PostgreSQL_SQL_Tricks#Diacritic_removing -
> which will not work because of the error, when I put _any_ valid UTF8
> character to the functions.
>

some people use iconv for this task

http://markmail.org/message/2jpp7p26ohreqnsh?q=plperlu+iconv+postgresql&page=1&refer=2jpp7p26ohreqnsh

Regards
Pavel Stehule

> Best,
>
> Andi
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2009-08-03 20:27:31 Re: character 0xe29986 of encoding "UTF8" has no equivalent in "LATIN2"
Previous Message Pavel Stehule 2009-08-03 19:28:05 Re: how can i mark date function like iscachable