in reply to Re^9: Japanese character in Linux
in thread Japanese character in Linux
$sSQL = " select japanese_longname, \n"; $sSQL .= " japanese_shortname \n"; $sSQL .= " from <table name> \n"; $sSQL .= " where instrument_id = '1301' \n"; $sSQL .= " and instrument_type = 'ST' \n"; #print("Sql i d $sSQL\n"); $dbFOX_sth=$dbFOX->prepare($sSQL); $dbFOX_sth->execute(); if ( @row = $dbFOX_sth->fetchrow_array ) { foreach ( @row) { $_ = Encode::decode_utf8( $_ ); } ( $sInstrumentNameJ, $sInstrumentShortJ ) = @row;
Here the values stored in $sInstrumentNameJ,$instrumentShortJ are passed to oracle stored procwhich is inserting into Nvarchar2 datatype columns. When we hardcode values with Ascii data like "ABC" it works fine , but for japanese data it comes as junk
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: Japanese character in Linux
by andal (Hermit) on Jul 11, 2011 at 23:30 UTC | |
by Anonymous Monk on Jul 14, 2011 at 12:31 UTC | |
|
Re^11: Japanese character in Linux
by Anonymous Monk on Jul 11, 2011 at 14:01 UTC |