Re: PostgreSQL 8.3.7: soundex function returns UTF-16 characters
В списке pgsql-bugs по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: PostgreSQL 8.3.7: soundex function returns UTF-16 characters |
| Дата | |
| Msg-id | 802.1239113181@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: PostgreSQL 8.3.7: soundex function returns UTF-16 characters (Frans <frans@geodan.nl>) |
| Список | pgsql-bugs |
Frans <frans@geodan.nl> writes:
> Does it make sense that the locale setting
> influences the workings of the soundex function?
Yeah, it absolutely would, because soundex depends on the C library's
isalpha() and toupper() functions, and those are influenced by locale.
It is clear from looking at the code that soundex isn't expecting
isalpha() to return true for anything except the ASCII letters A-Z,a-z.
That's true in the standard C locale but typically not true in others.
In your example with pi, I think the code would've indexed off the end
of its letter array and gotten unpredictable results. We could/should
tighten that up, I think, even if we're not willing to rewrite the
code for full multibyte support just yet.
regards, tom lane
В списке pgsql-bugs по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера