in reply to script inserts \x00 bytes on WinXP
I don't think it's a UTF8 issue...
You're probably right; it looks more like an UTF-16 (a.k.a. Windows Unicode) issue. See Encode and Encode::Supported.
Try the following in your script:
use Encode qw(from_to); ... from_to( $_, 'UTF-16LE', 'latin-1') for @sorted; print FOUT join("\n", @sorted);
Change the 'latin-1' to the actual encoding you want.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: script inserts \x00 bytes on WinXP
by ikegami (Patriarch) on Sep 05, 2008 at 22:37 UTC | |
by dwhite20899 (Friar) on Sep 06, 2008 at 01:38 UTC | |
by ikegami (Patriarch) on Sep 06, 2008 at 01:53 UTC | |
|
Re^2: script inserts \x00 bytes on WinXP
by dwhite20899 (Friar) on Sep 06, 2008 at 01:45 UTC | |
by Anonymous Monk on Sep 06, 2008 at 07:43 UTC | |
by dwhite20899 (Friar) on Sep 06, 2008 at 11:24 UTC | |
by Anonymous Monk on Sep 06, 2008 at 11:56 UTC | |
by dwhite20899 (Friar) on Sep 06, 2008 at 13:23 UTC | |
|