Обсуждение: Octal to UTF-8

Поиск
Список
Период
Сортировка

Octal to UTF-8

От
Weiss, Jörg
Дата:
Hi!

This is a post, based on a post of me before.

How can I convert the octal-code output of of an encode("text",'escape') to utf-8?

I wont to convert "f\303\274r" INTO "für" or "m\303\266chte" into "möchte"!

regards



Re: Octal to UTF-8

От
Vinayak
Дата:
Hi,

>I wont to convert "f\303\274r" INTO "für" or "m\303\266chte" into "möchte"!
The below function might be useful.
postgres=# select convert_from('f\303\274r','UTF8');convert_from
--------------für
(1 row)

postgres=# select convert_from('m\303\266chte','UTF8');convert_from
--------------möchte
(1 row)
Regards,
Vinayak



-----
Regards,
Vinayak,

--
View this message in context: http://postgresql.nabble.com/Octal-to-UTF-8-tp5857341p5857342.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.