hello you,
excuse me, please help!
precondition:
* 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
eg:
perl -Mencoding="iso 8859-1" -I lib/modules -I.
~/devel/test_unicode/perl/test_unicode_dbconnection.pl
# 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.
--
v.g.,
udoline alias udo(_at_)lipsia(_dot_)de