Click here to get back home

xml xsl and accented characters

 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
xml xsl and accented characters KaliKo 06-02-2005
Get Chitika Premium
Posted by KaliKo on June 2, 2005, 9:48 am
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 Villy Kruse on June 3, 2005, 8:10 am
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
Dealing with accented characters June 8, 2006, 10:44 am
regexp for accented characters February 19, 2008, 11:21 am
finding & saving accented (unicode) chars with perl 5.6.1 May 21, 2008, 7:57 am
Adding a delimiter inbetween number characters and letter characters January 12, 2005, 9:25 am
what to do with special characters like "é","ë",... November 11, 2004, 5:14 pm
Delete characters April 20, 2005, 3:51 pm
[FR/EN] how to remove the characters '-' September 19, 2005, 12:15 am
characters to ascii March 28, 2006, 10:24 pm
lwp and utf8 characters September 2, 2006, 3:31 am
Regarding junk characters !Help October 13, 2006, 5:59 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap