Click here to get back home

I use TK to show some chinese web page, I get nothing,why?

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
I use TK to show some chinese web page, I get nothing,why? quakewang 11-25-2006
Posted by quakewang on November 25, 2006, 9:00 pm
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Posted by zentara on November 26, 2006, 1:54 pm
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Similar ThreadsPosted
How to make image that show some web page? August 12, 2006, 9:52 am
How to show 'expiry page' when user click 'back' button in browser ? October 14, 2004, 10:45 am
print chinese char September 9, 2005, 9:05 am
how to read Chinese filenames? June 5, 2006, 5:49 pm
Looking for Chinese->English Translation Script September 13, 2005, 8:29 pm
could XML::Simple handling chinese character? June 16, 2007, 11:55 pm
Welcome to my webside that provides help in English Study for Chinese.. January 14, 2008, 8:46 am
anybody have experience in url decode (included chinese gb2312 character) ? August 27, 2004, 1:39 pm
www.hetong168.com Chinese biggest contract website first A2A gateway October 17, 2005, 11:02 pm
Create a chinese directory (folder) by Perl in Windows 2000 English OS September 21, 2004, 4:51 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap