big trubble perl encoding DBD/DBI

2003-09-24 04:30:04
hello you,

excuse me, please help!

* linux  redhat 9.0
* perl, v5.8.0
* dbms sybase 11.9.x (support iso-8859-1 )
* string contains german special chars "ä ö ü  ß  Ä Ö Ü"

the string will be written into the database through  perls  DBD/DBI

strange problem:
different process handling between encoding the data stream in the
file-descriptor and in the socket-descriptor (connecton via sybase-driver)
in perl ?

if I run my program with  pragma "encoding"  then I will got different
encoding datas  between SOCKET and STDOUT

perl -Mencoding="iso 8859-1" -I  lib/modules -I.

# output to STDOUT (file-descriptor) OK
test db connection (user=siteadmin)... successfull.
INSERT INTO test VALUES( '[0]  ä ö ü  ß  Ä Ö Ü', '[0] Ä Ö Ü  ß  ä ö ü' ) [0]

# output to SOCKET (socket-descriptor) FALSE
sql statment select ...  ERROR not my inserted values found
[0] result from sybase-DB:
col.  key1 =<<[0]  Ã? ö Ã?  Ã
                             Ã Ã>>
[0] result from sybase-DB:
col.  value=<<[0] Ã
                   Ã Ã  Ã

what can I do ?

the pragmas  "no encoding;"  does'nt help !

the special  trick:

use Encode;
# prepare utf8 default encoding for this string to off # perldoc Encode
Encode::_utf8_on( $sql_statement );

wont work with my tests   =8-(

please help, ThanX.
udoline alias udo(_at_)lipsia(_dot_)de

<Prev in Thread] Current Thread [Next in Thread>