patch: utf8_to_unicode (trivial)

Поиск
Список
Период
Сортировка
От Joseph Adams
Тема patch: utf8_to_unicode (trivial)
Дата
Msg-id AANLkTikXp_V4crhGTUXs_4VSyrMKTMtuufo6zwt5DDBT@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
In src/include/mb/pg_wchar.h , there is a function unicode_to_utf8 ,
but no corresponding utf8_to_unicode .  However, there is a static
function called utf2ucs that does what utf8_to_unicode would do.

I'd like this function to be available because the JSON code needs to
convert UTF-8 to and from Unicode codepoints, and I'm currently using
a separate UTF-8 to codepoint function for that.

This patch renames utf2ucs to utf8_to_unicode and makes it public.  It
also fixes the version of utf2ucs in  src/bin/psql/mbprint.c so that
it's equivalent to the one in wchar.c .

This is a patch against CVS HEAD for application.  It compiles and
tests successfully.

Comments?  Thanks,


Joey Adams

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: antisocial things you can do in git (but not CVS)
Следующее
От: "Massa, Harald Armin"
Дата:
Сообщение: Re: patch: Add JSON datatype to PostgreSQL (GSoC, WIP)