roundboy has asked for the wisdom of the Perl Monks concerning the following question:
I'm working on a system that processes a bunch of email, saves it all in a DB, and then allows web users to view and reply to the messages (this is a custom call center application). Why this is tricky for me:
The difficulty is that when I compose a message reply, we want to include the original message, and allow insertion of KB entries. Now if I set the encoding of the page (that displays the reply) to UTF-8, we can read the KB entries as they're inserted, but some of the original message is garbled (especially if gb2312 or big5). But, if I instead encode it using the charset of the original message, I can't read the KB entries.
The solution seems to be to convert either the original message or the KB entries used into the other charset. And that's my question: how do I do this? I've poked around CPAN, and the most likely suspect (Unicode::MapUTF8) does not support the charsets I need. I've also tried forking an iconv(1) to do the conversion, but it just aborts when it encounters a byte sequence it doesn't recognize, which is apparently pretty often with our data.
So does anyone have any wisdom or experience with charset conversions that they care to share?
Thanks, and happy holidays!
--roundboy
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unicode & charset conversions - how?
by CountZero (Bishop) on Dec 25, 2002 at 11:03 UTC | |
|
Re: Unicode & charset conversions - how?
by roundboy (Sexton) on Dec 24, 2002 at 20:04 UTC | |
|
Re: Unicode & charset conversions - how?
by John M. Dlugosz (Monsignor) on Dec 25, 2002 at 20:14 UTC | |
by roundboy (Sexton) on Dec 27, 2002 at 01:28 UTC |