perl-i18n

Problem with Text::Template 1.43 and Frontier::RPC2 and Japanese text

2002-06-10 04:49:21
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
peter(_at_)gmo(_dot_)jp                 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
-------------------------------------------------------------------



<Prev in Thread] Current Thread [Next in Thread>