in reply to How to perfrom a 'byte sequence' RE?
I've not used utf8 regex in the past but if I want to compare Japanese strings I change the character encoding into a 7-bit encoding (EUC for Japanese, which is two byte and preserves ascii codes), so maybe MIME::Base64 or some other packing method for the general case?
I believe that JPerl, a Japanized Perl, actually lets you do tr// and things with binary but this all seems pretty iffy, seems best to me to do something you know must work, though maybe not so elegant. Then test anyway. :)
By the way I don't know where your binary is coming from but watch out for endianness, which means that if you are reading a resource file from a Mac it probably stores a two or four byte value in the reverse order that a PC does. But if it is just an 8 bit ISO standard that problem shouldn't arise.
|
|---|