--- In [email protected], "brucexs" <bswit...@...> wrote: > > - > > setlocale(LC_CTYPE, "") > > mblen(lpChr, MB_CUR_MAX) > > > > > You took the time to track this down so I upload d5 which attempts to include > this error check. If it breaks something, pls just fall back go d4. >
Thanks, now it works even with smart quotes. BTW, there was one thing I couldn't decide which is the better. When, mblen() returns -1, should drop (or replace with a blank) only the first byte, or the whole MB_CUR_MAX byte(s). It isn't a problem with single-byte character set as MB_CUR_MAX is 1 there anyway. Although both have a possibility to end with an unexpected outcome, I have been leaned toward the first one. Only drop the first byte, then proceed from the next byte. However, PP seems to dropreplace the whole MB_CUR_MAX bytes, right? Then, what do you think on my opinion?
