On Tue, Mar 30, 2004 at 08:37:55AM -0500, Jeff Trawick wrote:
> >Actually I thought that the simple removal of check_sbcs() would be
> >appropriate for 0.9 too, rather than wait for someone to find a case
> >where it "does the wrong thing".
> 
> apr_xlate_sb_get() makes no sense without an sbcs check...  it is supposed 
> to be either for
> 
> i. code that knows that what its doing makes no sense if conversion is not 
> single-byte, and just wants to ask to sanity check
> 
> ii. code that wants to select simpler, faster buffer management if 
> conversion is single-byte
> 
> the situation where the app tells us to xlate between "foo" and "foo" is 
> just a small (and humorous) subset of intended purpose
> 
> removing apr_xlate_sb_get() is a change to a stable API; we don't even know 
> if there is any such charset for which current single-byte checking will 
> die, though of course the iconv handle reset bug needs to be fixed

To be clear: if there's a case where check_sbcs() gets a false positive,
"die" means it will just happily hand out incorrect translations.  That
would not be a fun case to debug (maybe a borked iconv(), maybe a user
environment screwup, maybe a terminal issue, etc).

For 0.9 if the issue is to keep EBCDIC platforms hobbling along then
maybe it should be left #if APR_CHARSET_EBCDIC.  I'm not proposing to
remove apr_xlate_sb_get() merely make it return 0 in all cases other
than identity translations.

joe

Reply via email to