tomland icon indicating copy to clipboard operation
tomland copied to clipboard

Encodes unicode characters with double backslash

Open srid opened this issue 3 years ago • 0 comments

I wonder if this is a regression from #354

In GHCi (run bin/repl from https://github.com/EmaApps/emanote/pull/327 to reproduce using Nix),

ghci> import qualified Toml
ghci> putTextLn $ Toml.encode (Toml.text "k") "✍️"
k = "\\U0000270d\\U0000fe0f"

Notice that tomland produces \\U0000270d instead of the expected \U0000270d. This breaks the functionality of https://stork-search.net/ (see https://github.com/EmaApps/emanote/issues/336).

srid avatar Aug 18 '22 00:08 srid