Problem with Text::Template 1.43 and Frontier::RPC2 and Japanese text
[email protected] (Peter Chow) Mon, 10 Jun 2002 20:48:37 +0900 (JST)
| Newsgroups | perl.i18n |
|---|---|
| Message-ID | <Pine.GSO.3.96LJ1.1b7.1020610204647.10910F-100000@imap.interq.or.jp> |
I am using Perl 5.6.1 on Debian Linux with Text::Template 1.43 and Frontier::RPC2 0.06. My template file is in Japanese Shift-JIS encoding. I am writing a XML-RPC server using Frontier::RPC2 as a CGI-based type running under Apache. The method I am calling is supposed to take a few parameters, populate the values into the template with Text::Template and then send out an email. What I have found is that the Japanese characters in my template gets corrupted in the output of the email when Text::Template runs with the data received from the XML-RPC client. Initially I thought the problem was with Text::Template, but I tested calling my Text::Template code directly and there was no character corruption. The problem only seems to occur when it is called with the data received from the XML-RPC client. I thought the problem was with the XML-RPC module, so I tried using RPC::XML instead of Frontier::RPC2, but the same corruption occurs. I also tried using the Template module instead of Text::Template, but still the same corruption. The parameters values I am sending between the XML-RPC client and server are currently just ASCII text. The terminal I am using to view the results is in Shift-JIS. Is there some Unicode conversion I have to do somewhere? Any suggestions would be greatly appreciated. ------------------------------------------------------------------- Peter Chow Chief Technical Advisor [email protected] Global Media Online Inc. ICQ: 41931890 Shibuya Cerulean Tower t: +81.3.5456.2687 26-1 Sakuragaoka-cho, Shibuya-ku f: +81.3.5456.2740 Tokyo, Japan http://www.gmo.jp/ 150-8512 PGP Fingerprint: 8396 0071 EB7F 76B8 D0A2 8D58 E597 7E1A 571B BCAA -------------------------------------------------------------------