Skip to content
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

Handle unicode chars properly #27

Open
dotslash opened this issue Feb 21, 2020 · 2 comments
Open

Handle unicode chars properly #27

dotslash opened this issue Feb 21, 2020 · 2 comments
Labels
bug Something isn't working repro-needed

Comments

@dotslash
Copy link
Owner

(bash) >15:01:56 $ å
bash: å: command not found
Traceback (most recent call last):
  File "/usr/local/bin/log-recent", line 10, in <module>
    sys.exit(log())
  File "/usr/local/lib/python2.7/site-packages/recent2.py", line 173, in log
    return_value, pwd, session.id])
sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings.
@dotslash dotslash added the bug Something isn't working label Feb 21, 2020
@dotslash
Copy link
Owner Author

Im not able to reproduce this
image

@dotslash
Copy link
Owner Author

ssh connection got interrupted and when I press , log-recent fails with this

Traceback (most recent call last):
  File "/Users/sai.suram/miniconda3/envs/bash/bin/log-recent", line 8, in <module>
    sys.exit(log())
  File "/Users/sai.suram/miniconda3/envs/bash/lib/python3.7/site-packages/recent2.py", line 256, in log
    log_command(command=command, pid=pid, sequence=sequence, return_value=return_value, pwd=pwd)
  File "/Users/sai.suram/miniconda3/envs/bash/lib/python3.7/site-packages/recent2.py", line 269, in log_command
    [int(time.time()), command, pid, return_value, pwd, session.id])
UnicodeEncodeError: 'utf-8' codec can't encode character '\udc9d' in position 0: surrogates not allowed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working repro-needed
Projects
None yet
Development

No branches or pull requests

1 participant