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

Rename files to avoid non-ascii characters #233

Merged
merged 2 commits into from
Jun 3, 2020

Conversation

stuarteberg
Copy link
Contributor

This PR renames files to avoid non-ascii characters to avoid git's "precomposed unicode is not supported" error on Mac.

Any Mac user with a recent version of git will encounter the following error when they clone the PySpice repo and run git status:

fatal: iconv_open(UTF-8,UTF-8-MAC) failed, but needed:
    precomposed unicode is not supported.
    If you want to use decomposed unicode, run
    "git config core.precomposeunicode false"

I called git config core.precomposeunicode false as suggested by the error message, and the problem disappeared. I guess all Mac users must do that when cloning PySpice.

What's the cause? Apparently something weird can happen when transferring files with non-ASCII names to/from the Mac filesystem. The PySpice repo contains two files with a non-ascii character (é):

examples/fundamental-laws/m4/thévenin-norton-theorem.m4
examples/fundamental-laws/thévenin-norton-theorem.py

I am not knowledgeable on the subject of "precomposed" vs. "decomposed" unicode, but here are some possible solutions:

  • Change those two file names
  • Maybe there is some way to fix the repo without changing the file names.
  • Add a warning to Mac users in the README

This PR just changes the file names.

@FabriceSalvaire
Copy link
Collaborator

FabriceSalvaire commented Jun 3, 2020

No problem to rename theses files, but it looks like this Git is buggy. How was installed Git ? Found this issues: conda-forge/git-feedstock#50

Another issue with renaming: we cannot easily change the history.

@FabriceSalvaire FabriceSalvaire added the iOS FLAG label Jun 3, 2020
@stuarteberg
Copy link
Contributor Author

Nice find. Yes, I installed git with conda-forge, which means git is relying on their build of libiconv. Perhaps the problem lies in that build.

Another issue with renaming: we cannot easily change the history.

In my testing, only the current file name triggers the problem. After renaming (or removing) the files, the error does not occur.

OK, this is not a "must have" change. It would be convenient for conda users (until the git build is fixed), but is otherwise not crucial.

@FabriceSalvaire
Copy link
Collaborator

I will wait ... because unicode must/should be supported in 2020 !

Did you try this https://git-scm.com/download/mac ?

@FabriceSalvaire
Copy link
Collaborator

diacritic is annoying for command line users e.g. how to enter the character with a lambda keyboard

@FabriceSalvaire FabriceSalvaire merged commit 9f0846b into PySpice-org:master Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants