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

UnicodeEncodeError on Python 2 #4

Open
homeworkprod opened this issue Feb 24, 2017 · 1 comment
Open

UnicodeEncodeError on Python 2 #4

homeworkprod opened this issue Feb 24, 2017 · 1 comment

Comments

@homeworkprod
Copy link

homeworkprod commented Feb 24, 2017

rpl 1.5.7 on Python 2 trips over some Unicode characters:

Processing:  /usr/lib/python3.4/site-packages/ipython_genutils/tests/test_path.py
Traceback (most recent call last):
  File "rpl", line 314, in <module>
    main()
  File "rpl", line 246, in main
    matches = blockrepl(f, o, regex, old_str, new_str, 1024)
  File "rpl", line 93, in blockrepl
    outstream.write(parts)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2202' in position 559: ordinal not in range(128)

The IPython test contains the literals u'∂ir' and u'ƒile'.

@JoshuaFern
Copy link

I believe I've encountered this issue, or something similar. Unicode characters near the replaced strings are being deleted.

See: dosbox-staging/dosbox-staging#197
Running this version: https://github.com/NixOS/nixpkgs/blob/3d6cdfa24bd771b36e8c87241d17275dd144c7a3/pkgs/tools/text/rpl/default.nix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants