Thread: Unicode or local language

Unicode or local language

From
Lelisa Diriba
Date:
unicode=# SET CLIENT_ENCODING TO UNICODE;
SET
unicode=# show client_encoding;
 client_encoding
-----------------
 UTF8
(1 row)
insert into person(name) values('ሳምሶን');when i insert From PGAdmin and when i want to SELECT FROM  SQL SHELL(PSQL) i doesn't the normal value.how psql support UNICODE character?
unicode=# select * from person;( from SQL SHELL)
 ßê│ßê¥ßê╢ßèò
(1 rows)
select * from person;(from PGAdmin)
ሳምሶን
(1 rows)
The Language i use is "Amharic language" which is From Africa (Ethiopia country)
I want use the local language Amharic from  SQL SHELL,
How i use the Local Language  from SQL SHELL?

Re: Unicode or local language

From
Laurenz Albe
Date:
Lelisa Diriba wrote:
> unicode=# SET CLIENT_ENCODING TO UNICODE;
> SET
> unicode=# show client_encoding;
>  client_encoding
> -----------------
>  UTF8
> (1 row)
> insert into person(name) values('ሳምሶን');when i insert From PGAdmin and when i want to SELECT FROM  SQL SHELL(PSQL) i
doesn'tthe normal value.how psql support UNICODE character?
 
> unicode=# select * from person;( from SQL SHELL)
>  ሳምሶን
> (1 rows)
> select * from person;(from PGAdmin)
> ሳምሶን
> (1 rows)
> The Language i use is "Amharic language" which is From Africa (Ethiopia country)
> I want use the local language Amharic from  SQL SHELL,
> How i use the Local Language  from SQL SHELL?

It's a bit hard to tell what is going on since you don't say what
your database encoding is, but I *guess* that everything is
working fine, except that your terminal does not expect unicode
and displays each character as three bytes.

What do you get if you run
  SELECT name::bytea FROM person;

Yours,
Laurenz Albe