> Changes from Ryan's sketch of apr_iconv.h, beyond function
> signatures:
>
> 1) ap_translate_codepage() is renamed to ap_translate_buffer() for
> no good reason
Probably because it's the buffer that gets translated, not the codepage.
I would prefer it to be called ap_convert_buffer() simply because
'translate'
sounds like you're doing a language translation, which we are not.
'Convert'
makes more sense.
> 2) no special preprocessor symbol is required to build this into
> APR; if iconv() isn't available, nothing will be supported
> since there is no fall-back mechanism; ap_codepage_open() will
> fail at run-time;
>
> Should the file be apr/lib/apr_iconv.c or apr/misc/unix/apr_iconv.c?
> I know of a eUnix system/RTL with no iconv() and I think I know of a
> non-Unix system/RTL with iconv(), so I don't really consider this
> Unix-specific. The possible future addition of non-iconv()
> translation support would help Unix (some) and non-Unix alike.
>
> Currently the set of routines is
>
> ap_codepage_open()
> ap_translate_buffer()
> ap_translate_char()
> ap_codepage_close()
> and the "handle" is ap_iconv_t.
>
> I prefer to change these names at some point (either to be more
> consistent with iconv() or just more consistent among themselves), but
> there is no need to do that immediately unless somebody feels like
> thinking about it now.
Yeah, more consistent with iconv() would be good. Again, as I mentioned
above, 'convert' would be better than 'translate' IMO.
Rob Simonson
AS/400 Apache Web Server
|