Re: Problem with Text::Template 1.43 and Frontier::RPC2 and Japanese text
[email protected] (Kevin Meltzer) Mon, 10 Jun 2002 10:25:10 -0400
| Newsgroups | perl.i18n |
|---|---|
| Message-ID | <[email protected]> |
Hi Peter, Are you using the utf or bytes pragma(s)? I couldn't reproduce this, but would be happy to try if you wanted to send me your template. When I transmit data, I try to use UTF-8.. but that may not suit your needs. Cheers, Kevin On Mon, Jun 10, 2002 at 08:48:37PM +0900, Peter Chow ([email protected]) said something similar to: > 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 > ------------------------------------------------------------------- -- [Writing CGI Applications with Perl - http://perlcgi-book.com] Shoot low, they're riding Shetlands -- Frank Zappa