Glenn Maynard said: > However, the case where 1: data is zero-terminated *and* 2: you don't at > least know whether you're dealing with an 8-, 16- or 32-bit encoding is, > in my experience, non-existant. After all, "zero-terminated" is > meaningless unless you know what "zero" means--an 8-bit, 16-bit or > 32-bit zero?
Ok, yeah. But it's still dangerous to have to consider 3 (well realistically 2) different terminators in an already busy encoding/decoding loop. The conversion routine is in a much better position to handle that safely. And it's still a little slow and it makes for ugly code. It makes me wince to have to scan for the terminator when I know it could be done much much cleaner in the conversion routine. Iconv is just clumsy. You can't even make (sane) wrappers to do this stuff. It's as if it were designed by people just converting big chunks of raw text. Maybe it's just me but I'm not seeing that in real world apps. Mike -- Linux-UTF8: i18n of Linux on all levels Archive: http://mail.nl.linux.org/linux-utf8/
