Table name with umlauts - Mailing list pgsql-general

From Thomas Kellerer
Subject Table name with umlauts
Date
Msg-id icec44$qn3$1@dough.gmane.org
Whole thread Raw
Responses Re: Table name with umlauts
List pgsql-general
Hi,

I'm curious why the following is not working:

c:\psql postgres postgres
psql (9.0.1)
Type "help" for help.
postgres=# select version();
                            version
-------------------------------------------------------------
  PostgreSQL 9.0.1, compiled by Visual C++ build 1500, 32-bit
(1 row)


postgres=# select pg_encoding_to_char(encoding) from pg_database where datname = 'postgres';
  pg_encoding_to_char
---------------------
  UTF8
(1 row)


postgres=# show client_encoding;
  client_encoding
-----------------
  UTF8
(1 row)


postgres=# create table umlaut_test_ö (id integer);
ERROR:  invalid byte sequence for encoding "UTF8": 0xf6202869
postgres=#

(it doesn't work either when I quote the table name using "umlaut_test_ö")

When I run the same create table using a JDBC based tool the table *is* created but the table name does not show up
correctlywhen I use DatabaseMetaData.getTables(). 

pgAdmin does not show this table correctly and after creating it through JDBC, psql doesn't show the table name
correctlyeither: 

postgres=> \d umlaut*
  Table "public.umlaut_test_ã¶"
  Column |  Type   | Modifiers
--------+---------+-----------
  id     | integer |


I initially posted this on the JDBC mailing list because I noticed this with Java, but it seems that it's not a JDBC
problem.

Could this be a Windows problem?

Note: I don't really want to use such a table name, I'm just wondering if this _should_ work.

Regards
Thomas



pgsql-general by date:

Previous
From: "Turner, John J"
Date:
Subject: extensions: creation of .sql files
Next
From: Tom Lane
Date:
Subject: Re: Table name with umlauts