rayex

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 2 of 2 Posts Switch mode

derek-zhou

derek-zhou

Does it compile if you quote it? ie: :"cōng_lǜ_green"

LostKobrakai

LostKobrakai

I tried a bunch of characters from “Latin Extended-B” and none of the ones I tried work. This looks like a bug to me tbh.

— All posts loaded —

Where Next?

Trending in Troubleshooting Top

octowombat
I tried to run the first LLM example “Your first LLM agent” in LiveBook. Firstly I got a weird Setup block: Mix.install([ {{mix_dep:ji...
New
cpeluti
Well, after getting tired of using prints to debug, I’ve decided to setup the debugger. After setting the launch as this: { "configu...
New
interpretive_scholar
I am trying to build a container for a new Phoenix app that I want to deploy in our kubernetes cluster. The container blows up when it ...
New
nwjlyons
or put another way, can I run a chunked worker on a queue which has no global limit set?
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

We're in Beta

About us Mission Statement