different encoding datastream; if using different (file/socket) descriptoren

U

udoline

hello all,

precondition:
* linux redhat 9.0
* perl, v5.8.0

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 ?
please help, ThanX.
 
U

udoline

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 (DBD/DBI) =8-(

what can I do ?

please help, ThanX.
 
U

udoline

Additional Comment #2 From udoline [on devel mode =:- D ] 2003-09-24 15:48

bei expilziter verwendung der kombinationen von:

# pragma
no encoding;
use Encode;
use DBI;
# use powercash21; # =:cool: oder so

# im zusammenspiel mit
my $dbh = DBI->connect( ... );

# n e u hier
# prepare utf8 default encoding for this string is set to off
# perldoc Encode
Encode::_utf8_on( $sql_stmt );

# prepare sql-stmt
my $sth = $dbh->prepare( $sql_stmt );


funktioniert es vorlaeufig.

maybe WONT FIX


hello all,

precondition:
* linux redhat 9.0
* perl, v5.8.0

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 ?
please help, ThanX.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top