P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
open FILE,'<:UTF-16','../perl/testproto/Protokoll.log')
or binmode FILE,':UTF-16'If you know the encoding of the file, you can tell Perl what it is, and it will act accordingly. Otherwise, it assumes it is 1 byte = 1 character, and fail on several multi-byte (or variable-length) encodings. Note: I wrote UTF-16 above since you said you got 'NULs after every character'. You should check if it is indeed UTF-16, or maybe UCS-2 (they're not the same, you know...), or even something else. -- dakkar - Mobilis in mobile In reply to Re: work with unicode data and regexps
by dakkar
|
|