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

No Emoji Support (Computer Name) #1053

Open
LeonNikolai opened this issue Oct 8, 2024 · 1 comment
Open

No Emoji Support (Computer Name) #1053

LeonNikolai opened this issue Oct 8, 2024 · 1 comment

Comments

@LeonNikolai
Copy link

LeonNikolai commented Oct 8, 2024

I have had my computer name be 🚀 (a rocket emoji) for a while, i recently decided to learn and install Erlang, Elixir, and Phoenix. When i reached Phoenix's installation step of "mix archive.install hex phx_new" i crashed. I struggled to figure out why. Until I realized its something Unicode, when i got a suspicion. I preceded to rename my computer to pure ascii characters, and I could run it just fine. I'm not sure if this is a Hex, Erlang, or Phoenix Issue, but from what I can tell its a Hex one.

  • 🚀as a computer name makes it fail.
  • I run Windows 11
PS C:\Users\leon\Desktop\PhoenixTest> mix archive.install hex phx_new

22:49:17.002 [notice] Application hex exited: Hex.Application.start(:normal, []) returned an error: shutdown: failed to start child: Hex.State
    ** (EXIT) an exception was raised:
        ** (UnicodeConversionError) invalid code point 55357
            (elixir 1.17.3) lib/list.ex:1103: List.to_string/1
            (elixir 1.17.3) lib/system.ex:627: anonymous fn/1 in System.get_env/0
            (elixir 1.17.3) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
            (elixir 1.17.3) lib/enum.ex:1703: Enum."-map/2-lists^map/1-1-"/2
            (elixir 1.17.3) lib/map.ex:262: Map.new_from_enum/2
            (hex 2.1.1) lib/hex/state.ex:234: Hex.State.load_config_value/3
            (hex 2.1.1) lib/hex/state.ex:155: anonymous fn/3 in Hex.State.init/1
            (elixir 1.17.3) lib/map.ex:257: Map.do_map/2

22:49:17.013 [notice] Application inets exited: :stopped
22:49:17.018 [notice] Application ssl exited: :stopped
22:49:17.019 [notice] Application public_key exited: :stopped
22:49:17.019 [notice] Application asn1 exited: :stopped
22:49:17.019 [notice] Application crypto exited: :stopped
Could not start Hex. Try fetching a new version with "mix local.hex" or uninstalling it with "mix archive.uninstall hex.ez"
@ericmj
Copy link
Member

ericmj commented Nov 13, 2024

Can you run System.get_env() inside an iex shell?

I don't know what encoding Windows environment variables have or if Erlang does some kind of conversion between the OS the Erlang runtime but whatever we get back from Erlang is not valid Unicode which is what we expect.

This seems to be either an Erlang issue or that you have a bad encoding in your environment variables.

As a note I can do this on macos:

FOO="🚀" iex                                                                               git:(main↓2|)
Erlang/OTP 27 [erts-15.0.1] [source] [64-bit] [smp:16:16] [ds:16:16:10] [async-threads:1] [jit]

Interactive Elixir (1.17.2) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> System.get_env("FOO")
"🚀"

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