Re: PostgreSQL 8.3.7: soundex function returns UTF-16 characters
| От | Tom Lane |
|---|---|
| Тема | Re: PostgreSQL 8.3.7: soundex function returns UTF-16 characters |
| Дата | |
| Msg-id | 6392.1239032070@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | PostgreSQL 8.3.7: soundex function returns UTF-16 characters (Frans <frans@geodan.nl>) |
| Ответы |
Re: PostgreSQL 8.3.7: soundex function returns UTF-16 characters
|
| Список | pgsql-bugs |
Frans <frans@geodan.nl> writes:
> We have just discovered a problem with the soundex function in
> PostgreSQL 8.3.7. The problem is easy to reproduce. The following query
> returns the ASCII code of the soundex representation of the Greek letter Pi:
> select ascii (soundex('Î '));
> In PostgreSQL 8.2.6 the result would be 0 (character null). In
> PostgreSQL 8.3.7 the return value is 944, which is the UTF-16 code of
> this letter.
Hm, I take it you are working in database encoding utf8? The
fuzzystrmatch module doesn't really work with utf8 (nor any other
multibyte encoding), because it depends on the <ctype.h> functions.
What you'll probably get when applying it to non-ascii utf8 is
an invalidly encoded string.
This is a known limitation that probably should be better documented.
It was just as broken in 8.2 (and every previous version), though.
regards, tom lane
В списке pgsql-bugs по дате отправления: