-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid ANSI version Windows string functions #168
Comments
usages for ANSI version Windows string functions can be found with |
A similar bug is using CRT string function (like >>> 'ァ'.encode('cp932')
b'\x83@' |
This remaining StrTrimA() and StrStrIA() are either used for ASCII strings, or failure are accepted, |
…CharUpperA(), issue zufuliu#168.
These functions are really designed for Windows ANSI code pages, may not works for UTF-8 encoded text.
Example for
StrTrimA()
failure on my system:where the UTF-8 encoded
str
is Japanese textが痛い
from issue #127.it seem StrTrimA fails when parameter contains invalid byte sequences in current ANSI code page.
This failure will cause sorting lines to add extra new lines to finally result, like sorting folowing lines on my systems (also comes from issue #127):
There are other places where StrTrimA or other ANSI string function is used, and may contains other bugs.
The text was updated successfully, but these errors were encountered: