On 22/03/12 00:16, Lex Trotman wrote:
[...]

Ok, so you do a trial read for a ASCII encoded coding instruction.


Yes.

I am by no means a Python3 expert, but I guess open 'rb', read say 512
bytes and search with a b'regex' should ignore all encoding and find
the pattern if it appears as ASCII bytes.  (As I said the quoted
project isn't Python so we just read into char[] and pretend the byte
array is ascii for the regex search)

Could also read with the 'ascii' codec and use the errors='replace' option.
http://docs.python.org/library/codecs.html#codec-base-classes

Cheers, Stuart


Cheers
Lex


--
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to