apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: nasty apr-util xlate bug
Date Fri, 19 Mar 2004 22:08:00 GMT
Joe Orton wrote:
> Hmm.  Is this sbcs thing really safe at all?  Just because a character
> set translation gives a particular mapping for 0x00-0xff in that order
> why is it guaranteed that it will for any other ordering of bytes? 
> 
> e.g. invent a mapping which does "0xff <end>" -> "0xff" but "0xff 0xf1"
> -> "0x42".  I'd be surprised if a mapping between two real charsets does
> *not* exist which does something like this, given the range of extremely
> weird and wonderful charsets out there.

to rule out this issue completely, 256 calls to iconv() would be required in 
check_sbcs() to test each proposed byte/char individually ;)

or maybe do two tests...  one with the byte values incrementing and one with 
the byte values decrementing...  that would seem to drastically reduce the chances

not nice either way

how else to tell that this is simple table?

Mime
View raw message