Didn't know that this is a matter of PHP-ODBC and not of SAPDB... Now I'm really in trouble! :-)
Well, the PostGreSQL ODBC driver retunrs UTF-8 strings by default etc.
I'd consider that more as a bug than a feature. So the behaviour of SAPDB ODBC driver is what i would call correct behaviour:
the ODBC driver deals with normal single byte charsets if not used in UNICODE mode.
UTF-8 is no single-byte charset cause one char get's tranformed into 2 or more bytes. That's why i would call the PostgreSQL's behaviour a bug.
Is there any trick to get Unicode encoded data into a Unicode column without using the ODBC-Wide-API?
To my knowledge there is none. If you insert UTF-8 formatted data into a UNICODE database, that UTF-8 string will be transformed into a mixture of UTF-8 and UCS with is the worse thing i can imagine.
The problem with PHP is, that PHP _does_ _not_ support unicode. functions like utf8encode() that i found in the php-docs are just "bridges" to applications/APIs that need UTF-8 input, but you will never be abled to correctly handle a unicode-string.
Ask the PHP people to program a ODBC Unicode binding for PHP. You will also need functions that explicitly or implicitly convert everthing to UCS2 to pass it to the ODBC Unicode API.
Well, there is iconv support in PHP, that will ease things, but you must have access to the ODBC Unicode functions. This is currently not given.
_______________________________________________ sapdb.general mailing list [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
