Lukin4Love has asked for the wisdom of the Perl Monks concerning the following question:
I am using perl v. 5.10.0 on a Vista 64 bit computer, trying to create a few lines in a file that I will later copy and paste into an XML file that uses UTF-8.
The XML file when viewed with "notepad" on a windows XP system shows what looks like text and arrow signs with a square between opposing arrow signs like this,,,,with [] representing the square.
___________________________________________________
lots of text>[]< lots of text>[]<lots of text___________________________________________________
When viewed on a Vista machine using "notepad" you don't see the [] character and see instead a newline carriage return is displayed like this.
_________________________________________________
lots of text>
< lots of text>
<lots of text
__________________________________________________
I think the [] represents a char(13) character(10) i.e. \x0D \x0A i.e. I think x000D x000A . But maybe it needs to be sent differently because it is for a UTF-8 xml file.
I tried to copy just the [] character into a text file and then used
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxmy @odaoutput= <ODOA>; print OUTFILE " some text>@odaoutput";
Everything I try ends up looking like a line feed carriage return, even on the XP system. Never does it look like the original [] when viewed on the XP system. Can you help me please?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: adding 0D 0A to a UTF-8 file.
by cdarke (Prior) on Feb 23, 2011 at 07:58 UTC | |
|
Re: adding 0D 0A to a UTF-8 file.
by ikegami (Patriarch) on Feb 23, 2011 at 15:31 UTC | |
|
Re: adding 0D 0A to a UTF-8 file.
by elef (Friar) on Feb 23, 2011 at 16:53 UTC |