CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate:
Wide character in print at main.pl line ...

 



Tumata
User


Apr 10, 2009, 8:39 AM

Post #1 of 3 (1908 views)
Wide character in print at main.pl line ... Can't Post

Hi! I have a question. I wrote script, that gets web page with help of LWP::UserAgent. Then I get one substring using regexp. And finally print this substring onto console. The problem is that this page contains russian words and when I printing it perl complains: "Wide character in print at main.pl line 13.". When I saw STOUT of my script throught hexdump I discovered that my string encoded with two bytes for character (substring also contains russian words). What is wrong with my script?


george.heller
New User

Apr 10, 2009, 1:53 PM

Post #2 of 3 (1899 views)
Re: [Tumata] Wide character in print at main.pl line ... [In reply to] Can't Post

Did you try printing the output in UTF8?

binmode(OUT, ":utf8");


Tumata
User


Apr 15, 2009, 5:53 AM

Post #3 of 3 (1858 views)
Re: [george.heller] Wide character in print at main.pl line ... [In reply to] Can't Post

It doesn't help me. Thanks any way. I should investigate this issue deeper..

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives