-
Notifications
You must be signed in to change notification settings - Fork 117
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
Only Ascii characters accepted #76
Comments
A response to the stackoverflow post, Test if a python string is printable, provides a clever way to check for non-printable characters: def is_printable(s):
return not any(repr(ch).startswith("'\\x") or repr(ch).startswith("'\\u") for ch in s) Replacing the check in if is_printable(c):
return c
else:
return UNDEFINED_KEY I'll create a PR with this change, hopefully it will be accepted since allowing utf-8 input should be a requirement (IMO). |
str.startswith optionally takes a tuple of strings to try. Better to write the above as |
I had no idea that you could provide a tuple to |
Hello, my colleague and I use this codebase pretty often in our projects but the original and all forks seem to be stale. We have thus forked into our own project, BulletPrompt. I have taken the liberty to fix this issue, which will be available in the next release. PR with fix: danner26#10 |
It appears that only input not accepted. The basic issue lies in
getchar
:bullet/bullet/utils.py
Lines 52 to 55 in 75f620d
where string.printable contains only printable ASCII characters. This leaves all people with wider utf-8 input in the cold.
The text was updated successfully, but these errors were encountered: