Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^3: script inserts \x00 bytes on WinXP

by dwhite20899 (Friar)
on Sep 06, 2008 at 01:38 UTC ( [id://709423]=note: print w/replies, xml ) Need Help??


in reply to Re^2: script inserts \x00 bytes on WinXP
in thread script inserts \x00 bytes on WinXP

the output file contains one huge line of

\x{4445}\x{3035}\x{533b}\x{676f}\x{203b}\x{2e34}\x{4e37}\x{6475}\x{736f}\x{203b}\x{6f43}

Seriously, an "od -c" of the output file shows this:

0000000 \ x { 7 6 4 5 } \ x { 6 e 6 5 + } 0000020 \ x { 6 f 7 4 } \ x { 4 2 2 0 + } 0000040 \ x { 7 1 7 5 } \ x { 6 5 7 5 + } 0000060 \ x { 2 0 3 b } \ x { 5 f 5 2 + } 0000100 \ x { 7 5 5 4 } \ x { 6 2 7 2 + }

I actually got my hands on a WinXP machine running ActivePerl and ran the script with this code on XP, and got the above output.

Horrible thing is (for my friend) when I run my original script on XP, it works like I expect - NOT producing the \x00 bytes! I don't understand this, and I can't replicate it, and I can't visit him (10 time zones away) to see WTF is going on.

Replies are listed 'Best First'.
Re^4: script inserts \x00 bytes on WinXP
by ikegami (Patriarch) on Sep 06, 2008 at 01:53 UTC
    It's not Perl. The input file he used is different than yours, the output file he gave you is not the output he really got, or the script he used is different. The most likely explanation is that somewhere before or after the script was run, the input or output file was converted to UTF-16.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://709423]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2026-01-21 16:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (125 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.