-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 19 December 2002 16:09, you wrote:
> Hello,
>
> Do you have other databases that work with UNICODE? You can check the
> encoding of all your databases with 'psql -l'. You can check if you can
> create any unicode databases with 'createdb -E UNICODE mytestdatabase'.
>
> I didn't use postgresql on solaris yet, so the following is just a
> guess: maybe you need to install additional solaris packages. For
> example to get tomcat/java working with utf-8/unicode/.. instead of
> plain ascii, we need at least the following on our systems:
>
> SUNWloc        System Localization
> SUNWlocx       System Localization (64-bit)
> SUNWeuluf      UTF-8 L10N For Language Environment User Files
> SUNWeulux      UTF-8 L10N For Language Environment User Files (64-bit)

No, all our databases are LATIN1, it's the JDBC driver which want to "set 
client_encoding = 'UNICODE'". I havn't tried to connect to a UNICODE (-E 
UNICODE) database with the JDBC driver.

I now created a test database <andreak> with -E UNICODE
Here is some output:

[andreak@www2] ~$ uname -a
SunOS www2.java.no 5.8 Generic_108528-16 sun4u sparc SUNW,Ultra-250
[andreak@www2] ~$ psql -l
        List of databases
   Name    |  Owner   | Encoding
- -----------+----------+-----------
 andreak   | andreak  | UNICODE
 template0 | postgres | SQL_ASCII
 template1 | postgres | SQL_ASCII
 www       | onp      | LATIN1
(4 rows)

[andreak@www2] ~$ psql andreak
Welcome to psql 7.3, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

andreak=# select version();
                                version
- -----------------------------------------------------------------------
 PostgreSQL 7.3 on sparc-sun-solaris2.8, compiled by GCC gcc (GCC) 3.2
(1 row)

andreak=# show client_encoding ;
 client_encoding
- -----------------
 UNICODE
(1 row)

andreak=# set client_encoding = 'LATIN1';
ERROR:  Conversion between LATIN1 and UNICODE is not supported
andreak=# set client_encoding = 'UNICODE';
SET
andreak=# \q
[andreak@www2] ~$ psql www
Welcome to psql 7.3, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help on internal slash commands
       \g or terminate with semicolon to execute query
       \q to quit

www=# set client_encoding = 'LATIN1';
SET
www=# set client_encoding = 'UNICODE';
ERROR:  Conversion between UNICODE and LATIN1 is not supported
www=#

This works fine on Linux, I havn't tried to patch Solaris with l10n-stuff yet, 
but it would be nice to get some feedback and understand why this is 
happening and why I don't get a more descriptive error. For some reason none 
of the conversions work at all, except, of course, conversion between similar 
encodings like UNICODE<->UNICODE.

- -- 
Andreas Joseph Krogh <[EMAIL PROTECTED]>
        There will always be someone who agrees with you
        but is, inexplicably, a moron.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+AeQ4UopImDh2gfQRAuRvAKCbk4pyp7CbXiA4NGq8ntKpZ2IriwCeKcaC
/pPGUgPzEuzDmIdX3shR8Ps=
=EYP3
-----END PGP SIGNATURE-----


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to