| От | smcg2297@frii.com |
|---|---|
| Тема | a couple questions about convert() |
| Дата | |
| Msg-id | 541B5E36.2080801@frii.com обсуждение исходный текст |
| Ответы |
Re: a couple questions about convert()
|
| Список | pgsql-general |
Hello,
In a postgresql-9.3.1 database with UTF8 encoding I can do:
select convert_from (E'\\x68656c6c6f', 'LATIN1');
convert_from
--------------
hello
But when I explicitly give the "to" encoding:
select convert (E'\\x68656c6c6f', 'LATIN1', 'UTF8');
convert
--------------
\x68656c6c6f
Why does that second one give different results from the first?
Second question: why is that none of the convert* functions are
marked as immutable (thus preventing me from creating a functional
index using them). Surely if I convert \x68 to utf-8 the result
will *always* be "h", won't it?
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера