rayex
Invalid Unicode in unquoted atom
When I compile hex package io_ansi_plus, I get error “Codepoint failed”. Why? and why are the “Got:” and “Hint:” codepoints identical? It seems in an unquoted atom that Pinyin character ǜ (Latin Small Letter U with diaeresis and grave) is invalid. However Pinyin character ǔ (Latin Small Letter U with caron) is valid. I am using Elixir v1.19.5 when getting this error. In version v1.18, the same source code compiled fine! Here is the error:
mix compile
Compiling 2 files (.ex)
== Compilation error in file lib/io/ansi/plus/ie.ex ==
** (SyntaxError) invalid syntax found on config/persist_colors.exs:2321:13:
error: unexpected token: Codepoint failed identifier tokenization, but a simpler form was found.
Got:
"cōng_lǜ" (code points 0x00063 0x0014D 0x0006E 0x00067 0x0005F 0x0006C 0x001DC)
Hint: You could write the above in a similar way that is accepted by Elixir:
"cōng_lǜ" (code points 0x00063 0x0014D 0x0006E 0x00067 0x0005F 0x0006C 0x001DC)
See https://hexdocs.pm/elixir/unicode-syntax.html for more information.
│
2321 │ :cōng_lǜ_green,
│ ^
│
└─ config/persist_colors.exs:2321:13
(elixir 1.19.5) lib/code.ex:628: Code.validated_eval_string/3
(elixir 1.19.5) lib/config.ex:326: Config.eval!/3
(elixir 1.19.5) lib/config/reader.ex:102: Config.Reader.read!/2
lib/io/ansi/plus/ie.ex:4: anonymous fn/1 in :elixir_compiler_2.MODULE/1
(elixir 1.19.5) lib/enum.ex:961: Enum.“-each/2-lists^foreach/1-0-”/2
lib/io/ansi/plus/ie.ex:4: (module)
First Post!
derek-zhou
Does it compile if you quote it? ie: :"cōng_lǜ_green"
Popular in Troubleshooting
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








