Thanks to visit codestin.com
Credit goes to postgrespro.com

Re: Knowing the length(convert(username using windows_1251_to_utf8)) - Mailing list pgsql-general

From Alexander Farber
Subject Re: Knowing the length(convert(username using windows_1251_to_utf8))
Date
Msg-id [email protected]
Whole thread Raw
In response to Knowing the length(convert(username using windows_1251_to_utf8))  ("Alexander Farber" <[email protected]>)
List 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 <[email protected]> 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 by date:

Previous
From: Shane Ambler
Date:
Subject: Re: Postgres Replication
Next
From: Shane Ambler
Date:
Subject: Re: PG compilation