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

unicode macro support #35

Open
hillam opened this issue May 1, 2017 · 1 comment
Open

unicode macro support #35

hillam opened this issue May 1, 2017 · 1 comment

Comments

@hillam
Copy link
Contributor

hillam commented May 1, 2017

I'm a big fan of ¯\(ツ)/¯ (as well as many others)

But I get the following error when I try to use this as a macro:
image

Alt codes are certainly better than nothing, but it would be great it we could use unicode characters in macros. I've looked through macroparse.py a bit and this seems like it might be within the realm of possibility.

@dhowland
Copy link
Owner

dhowland commented May 2, 2017

It would be great, yes.

In the beginning, EasyAVR was created by me for me. Being a typical American, I just didn't give a single thought to internationalization, and Unicode just wasn't on my radar. Also I started on Python 2.7 so all strings were ASCII.

I don't have time to implement this. I will be moving to Python 3.6 this year and deprecating 2.7 support, so we could count on Unicode strings being the default. So, an implementation is possible. If you can take a crack at it, please do so.

What I would probably do is insert a Unicode translation layer into the current code. It could try and examine each character and, if not in UTF-8, try and translate it to an ALT code. It's not trivial but it should be possible.

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

No branches or pull requests

2 participants