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

Characters truncated to 16 bits #388

Open
WolframKahl opened this issue Sep 6, 2016 · 2 comments
Open

Characters truncated to 16 bits #388

WolframKahl opened this issue Sep 6, 2016 · 2 comments

Comments

@WolframKahl
Copy link

With the current version of Haste, the 𝔹 loses its 17th bit:

{-# LANGUAGE StaticPointers, OverloadedStrings #-}
import Haste.App.Simple
import qualified Haste.JSString as JSS

main = runSimpleApp $ do
  p <- newElem "p"
  t <- newTextElem (JSS.pack $ "The set of Booleans is written 𝔹.")
  setChildren p [t]
  appendChild documentBody p

The resulting page shows:

The set of Booleans is written 픹.

𝔹 is codepoint 0x1d539, and is codepoint 0xd539.

@WolframKahl
Copy link
Author

(--full-unicode and --opt-all do not make a difference.)

@valderman
Copy link
Owner

Good catch. pack currently works pretty much like Data.ByteString.pack, but there's no compelling reason why it shouldn't be smarter.

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