Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^5: Regular expressions across multiple linesby afoken (Chancellor) |
on Apr 24, 2016 at 19:23 UTC ( [id://1161390]=note: print w/replies, xml ) | Need Help?? |
Create a hex dump of the problematic file, and post a relevant part of it. If you are on unix (Linux, BSD, Mac OS X), try the command od -tx1 -c filename.txt:
A plain ASCII file should not contain any bytes outside the range 0x20 to 0x7E, except for 0x0D and / or 0x0A for newlines. Any other byte value below 0x20 is very fishy, as is 0x7F. Bytes from 0x80 to 0xFF should not appear in ASCII files, they may indicate some other encoding, like UTF-8 and various legacy encodings. If (nearly) every second byte is 0x00, it is very likely a text file encoded in UTF-16 or UCS-2; if only every fourth byte is not 0x00, the file is probably encoded in UTF-32. Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
In Section
Seekers of Perl Wisdom
|
|