Daniel Richard G. dixit: >Good news! > >I played with this some more, and found what was missing: a call to >setlocale().
Oh. > /* very much NOT Latin-1 compatible */ > setlocale(LC_ALL, "Ru_RU.IBM-1025"); [...] >...the input should have been converted to ISO 8859-5. > >So it seems like maybe the IBM docs are a bit flexible in what they mean >when they say "ISO 8859-1" :-] Yeah, their definition of "ASCII codepage" is also a bit... off. >Do you still want the other tables? No, thanks, this is information enough. >thing to note is that not just any EBCDIC codepage can be used in a >POSIX environment, because if you can't encode e.g. square brackets, >then basic things like shell scripts will break. Hmm. I could check for required characters in the output, or just leave this to the user. (We likely only support the codepage the shell was compiled for anyway, due to all those embedded strings.) >> When does it error out, too? > >It's in the doc. Both failure modes (non-SBCS locale, out-of-memory >condition) should be extremely rare, to the point that they don't really >need to be handled gracefully. OK, thanks. bye, //mirabilos -- <diogenese> Beware of ritual lest you forget the meaning behind it. <igli> yeah but it means if you really care about something, don't ritualise it, or you will lose it. don't fetishise it, don't obsess. or you'll forget why you love it in the first place.