Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx> 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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux