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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support extended character sets in install.conf.yaml 馃悎 #205

Closed
jkrauska opened this issue Nov 19, 2019 · 5 comments
Closed

Support extended character sets in install.conf.yaml 馃悎 #205

jkrauska opened this issue Nov 19, 2019 · 5 comments
Labels

Comments

@jkrauska
Copy link

I wanted to include a file named 馃悎 in my dotfiles.

$ ./install
Could not read config file:
  unacceptable character #xd83d: special characters are not allowed
    in "install.conf.yaml", position 162

Please consider supporting extended character sets?

@jkrauska
Copy link
Author

@anishathalye
Copy link
Owner

It's kinda fixed in PyYAML 5.1.2. Dotbot 2c8a043 switches to that version, so emoji kinda works.

The support depends on sys.maxunicode, so for me, it was working with Python 3, but not with Python 2. I opened an issue in PyYAML for this: yaml/pyyaml#350

Until this works in both Python 2 and Python 3, support for emoji won't be added to Dotbot's spec (/ won't add tests for it), but as of the latest Dotbot commit, emojis etc do seem to work with newer versions of Python.

@anishathalye
Copy link
Owner

I submitted a PR to PyYAML to fix the issue with Python 2 (UCS-2) support: yaml/pyyaml#351

@anishathalye
Copy link
Owner

anishathalye commented Jan 7, 2020

That PR has been merged into PyYAML and released in 5.3.

We can support emojis now -- I'll merge in a test for this in a day or two.

@anishathalye
Copy link
Owner

I bumped the PyYAML version to 5.3 in 5d83f9e. The emoji filenames should probably work for you now.

I'm not going to bother with adding the test because it was annoying to get it fully working cross-platform (got it working with cpython 2/3, and pypy2, but was having trouble with pypy3), and it didn't really seem worth it.

The emoji filename stuff will probably work for you unless you're using pypy3. If anyone is particularly enthusiastic about trying to get this to work on pypy3, feel free to reopen / submit a PR.

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

No branches or pull requests

2 participants