Re: Knowing the length(convert(username using windows_1251_to_utf8))

Поиск
Список
Период
Сортировка
От Alexander Farber
Тема Re: Knowing the length(convert(username using windows_1251_to_utf8))
Дата
Msg-id 943abd910701110133o1314c469k7b66985ee8cbb0f2@mail.gmail.com
обсуждение исходный текст
Ответ на Knowing the length(convert(username using windows_1251_to_utf8))  ("Alexander Farber" <alexander.farber@gmail.com>)
Список pgsql-general
And additional question please:

Can I still be sure that the data returned in the
convert(username using windows_1251_to_utf8)
column will be 0-terminated or should I fetch
the data length using PQgetlength and maintain
that value in my C-program?

Thank you
Alex

On 1/11/07, Alexander Farber <alexander.farber@gmail.com> wrote:
> phpbb=> show client_encoding;
> -----------------
>  WIN1251
> (1 row)
>
> phpbb=> \d phpbb_users;
> ........
>  username              | character varying(25)  | not null default ''::character
> ........
>
> phpbb=> select username, length(username), length(convert(username
> using windows_1251_to_utf8)) from phpbb_users where user_id=224;
>     username     | length | length
> -----------------+--------+--------
>  Лукашенко И. В. |     15 |     26
> (1 row)
>

--
http://preferans.de

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

Предыдущее
От: Shane Ambler
Дата:
Сообщение: Re: Postgres Replication
Следующее
От: Shane Ambler
Дата:
Сообщение: Re: PG compilation