| From: | Teodor Sigaev <teodor(at)sigaev(dot)ru> |
|---|---|
| To: | Greg Stark <greg(dot)stark(at)enterprisedb(dot)com> |
| Cc: | Greg Stark <stark(at)enterprisedb(dot)com>, Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>, Hiroshi Saito <z-saito(at)guitar(dot)ocn(dot)ne(dot)jp>, PG Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: regression test crashes at tsearch |
| Date: | 2009-03-02 20:43:03 |
| Message-ID: | 49AC44D7.7040804@sigaev.ru |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
> Hmm well the KOI8 tests unsurprisingly produce random results on
> non-KOI8 input. It's pure chance you didn't get EILSEQ.
Because KOI8 is not multibyte encoding.
> What errno did you get for the C locale test? On which input
> character?Perhaps it's sihnalljng EILSEQ for every byte >0x80 ? That
> seems broken to me but perhaps not to a glibc pedant out there.
Linux
========C==========
mbstowcs returns -1 errno: 84 Invalid or incomplete multibyte or wide
character
========ru_RU.KOI8-R==========
mbstowcs returns 12 errno: 0 Success
========ru_RU.UTF-8==========
mbstowcs returns 6 errno: 0 Success
FreeBSD
========C==========
mbstowcs returns 12 errno: 0 Unknown error: 0
========ru_RU.KOI8-R==========
mbstowcs returns 12 errno: 0 Unknown error: 0
========ru_RU.UTF-8==========
mbstowcs returns 6 errno: 0 Unknown error: 0
In any case, we could not trust mbstowcs if current locale is not match
to encoding. And we could not check every pair of locale/encoding but
mbstowcs with C-locale and multibyte encoding obviously doesn't work.
| Attachment | Content-Type | Size |
|---|---|---|
| t-1.c.gz | application/gzip | 505 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Merlin Moncure | 2009-03-02 21:43:55 | statistics horribly broken for row-wise comparison |
| Previous Message | Pavel Stehule | 2009-03-02 20:04:43 | Re: proposal: psql - breaking rows in white chars for wrapped format |