[sword-devel] Sapphire, module cipher

Martin Gruner mg.pub at gmx.net
Sun Mar 5 13:57:01 MST 2006


> Still, the simpler route is Martin's check for non-printables after
> deciphering the first 100 or so characters. (I'm assuming that it is fully
> UTF-8 aware.)

DM,

atm the routine treats the data as Latin1 byte sequence. This should work 
because all nonprinting characters are <= 127 (first byte 0), and all higher 
unicode UTF-8 encoded characters consist of bytes >= 128 (first byte 1). I 
found this better than parsing the stream as UTF-8, because it might contain 
rubbish without the valid key.

mg


More information about the sword-devel mailing list