Thread: BUG #1153: to_ascii() doesn't work on eth (ðÐ)

BUG #1153: to_ascii() doesn't work on eth (ðÐ)

From
"PostgreSQL Bugs List"
Date:
The following bug has been logged online:

Bug reference:      1153
Logged by:          Peter of the Norse

Email address:      RahmCoff@Radio1190.org

PostgreSQL version: 7.3.4

Operating system:   Linux

Description:        to_ascii() doesn't work on eth (ðÐ)

Details:

I use to_ascii() to deal with the fact that we have American keyboards but
must deal with various languages. It works great, but for the occational
icelandic word with ð in it. Currently to_ascii changes all ð's to spaces,
which breaks everything. I understand that it's usually translated as 'th',
but 'd' is a much more common substitution.

Re: BUG #1153: to_ascii() doesn't work on eth ( )

From
Tom Lane
Date:
"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
> Currently to_ascii changes all ð's to spaces,
> which breaks everything.

The present to_ascii() code isn't very bright ... it doesn't know about
very many encodings, and it can't handle length-changing edits, which
is what you seem to need.  Want to improve it and send a patch?  See
src/backend/utils/adt/ascii.c.

            regards, tom lane