This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients christian.heimes, loewis, serhiy.storchaka, vstinner
Date 2012-09-20.14:53:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1348152789.11.0.127738345027.issue15954@psf.upfronthosting.co.za>
In-reply-to
Content
> No, I think the appropriate error is ValueError, at least if errno is EINVAL.

With what message?

> msvcrt gives EILSEQ or ERANGE, but never EINVAL. EILSEQ is returned if LCMapString failed, and ERANE if the output buffer is too small.

I don't see where ERANE can be returned. If the output buffer is too small then the required buffer size (not including terminating null-char) should be returned.

I see the same issue with wcscoll() in locale.strcoll().

An alternative solution is in case of an error to return the original string (in locale.strxfrm) and to compare strings without regard locale (in locale.strcoll).
History
Date User Action Args
2012-09-20 14:53:09serhiy.storchakasetrecipients: + serhiy.storchaka, loewis, vstinner, christian.heimes
2012-09-20 14:53:09serhiy.storchakasetmessageid: <1348152789.11.0.127738345027.issue15954@psf.upfronthosting.co.za>
2012-09-20 14:53:08serhiy.storchakalinkissue15954 messages
2012-09-20 14:53:08serhiy.storchakacreate