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

Data.String.Interpolate.IsString doesn't support Unicode #14

Open
williamyaoh opened this issue Mar 9, 2019 · 0 comments
Open

Data.String.Interpolate.IsString doesn't support Unicode #14

williamyaoh opened this issue Mar 9, 2019 · 0 comments

Comments

@williamyaoh
Copy link

Interpolating a String/Text into a ByteString results in each character getting truncated to a single byte:

-- lts-13.7
λ> t = "一生懸命" :: Text
λ> b = [i|#{t}|] :: ByteString
λ> b
 => "\NUL\US\248}"

Unfortunately, this truncation seems to be happening within ByteString's IsString instance.

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

1 participant