good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
UTF-8, Oracle and Perl lifeby Akira71 (Scribe) |
on Oct 07, 2002 at 16:48 UTC ( [id://203392]=perlquestion: print w/replies, xml ) | Need Help?? |
Akira71 has asked for the wisdom of the Perl Monks concerning the following question:
First I am new to Perl and I have searched everywhere for an answer to this question without much luck, but I thought I would try you enlightened people. I have a new application done entirely in Java(groan) that works in Japanese for a major corporation. It turns out though, that the reporting structure for the company (extracts, formatting, etc..) is done entirely in Perl 5.6.0. This is what Perl is excellent at doing so it should be fine. Well the problem boils down to legacy system and I am not sure what to do about it. I have Perl 5.6.0, Oraperl module to connect to Perl and JCODE to deal with the Japanese encodings. All should be well, but basically what I am finding out is that Perl, even with Use UTF8 does not use UTF8 well. We are extracting garbage out of the database that is consistent with the ASCII representation of UTF8 / ShiftJIS data. In otherwords, if you do not have the font, then this how that kanji character will look. Oracle 8i is set to run in UTF8 and it is preserving the encoding correctly and Java seems to deal with the data correctly (our application runs in Japanese) but Perl does nothing with this information. First if we write it out to a text file, all encoding is lost. I know there is a way to ensure that UTF8 is used for output in Perl 5.8 but we cannot upgrade. Second it actually appears that Oraperl is dropping the encoding information whenever we retrieve data. I am fairly certain of this because when we call JCODE to convert the character sets, the input is there, but then it does not tranform the characters and it ends up having an empty string.
What I am asking, is if anyone has experience using UTF8, Oracle 8i, Perl 5.6, Oraperl and in Japanese can shed some enlightenment my way. I am having a heck of a time.
Back to
Seekers of Perl Wisdom
|
|