perl-unicode

Re: Help on perl coding with Unicode

1999-11-01 21:55:29
On Sun, 31 Oct 1999 23:13:28 -0800 (PST), Mohammad Akram Ali Mehkri 
<mehkri(_at_)yahoo(_dot_)com> said:

Hi. Hope to find u in great health
I am writing a cgi script which is supposed to take in
user input and convert it to pdf format. 
The script works fine with english (iso-8859-1)(basic
latin) but when the user inputs non english language
data string then the output is just junk. I was
informed that perl 5.00562 has some support for
unicode. I am a newbie to 2 byte/multibyte data
manipulation. I have with me compiled and installed
Unicode modules from CPAN, I18n and other related
stuff

The Unicode support in perl 5.00550 and above is going to change in
the next revisions, so I would not recommend relying on it in its
present form.

Can any body please tell me in simple terminology how
it has to be done. Examples will be welcomed. 

Generally speaking, you output strings coded in the UTF-8 format (RFC
2279) and change the Content-Type header to

    Content-Type: text/html; charset=utf-8

A practical example:

    Content-Type: text/html; charset=utf-8

    Hello wörld

-- 
andreas

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