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

Improve unicode support #13

Open
MHendricks opened this issue Mar 15, 2024 · 0 comments
Open

Improve unicode support #13

MHendricks opened this issue Mar 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@MHendricks
Copy link
Member

Summary

I've found a couple of problem areas when using unicode.

  1. Pasting print("🎉") into the console ends up pasting print("?"). Though I can still use Win + . to insert emojis(same error).
  2. If the workbox has unicode text it will cause errors when trying to save to disk. This causes preferences to loose the contents of that file and possibly others.
Traceback (most recent call last):
  File "C:\blur\dev\PrEditor\preditor\gui\loggerwindow.py", line 203, in <lambda>
    lambda: self.recordPrefs(manual=True)
  File "C:\blur\dev\PrEditor\preditor\gui\loggerwindow.py", line 705, in recordPrefs
    workbox_prefs = self.uiWorkboxTAB.save_prefs()
  File "C:\blur\dev\PrEditor\preditor\gui\group_tab_widget\__init__.py", line 295, in save_prefs
    tab_widget.widget(j).__save_prefs__(
  File "C:\blur\dev\PrEditor\preditor\gui\workbox_mixin.py", line 268, in __save_prefs__
    self.__write_file__(
  File "C:\blur\dev\PrEditor\preditor\gui\workboxwidget.py", line 194, in __write_file__
    fle.write(cls.__unix_end_lines__(txt))
  File "C:\Users\hendew\AppData\Local\Programs\Python\Python39\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 29-30: character maps to <undefined>
@MHendricks MHendricks added the bug Something isn't working label Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant