ghcjs / ghcjs-base

base library for GHCJS for JavaScript interaction and marshalling, used by higher level libraries like JSC
MIT License
45 stars 67 forks source link

JSString.drop does not handle astral chars correctly #119

Closed luigy closed 5 years ago

luigy commented 6 years ago
{-# LANGUAGE OverloadedStrings #-}
import qualified Data.JSString as String

main :: IO ()
main = do
  let t = "aaaaaa\1014624aaaa"
  print $ String.drop 11 t -- "aaaaaa\1014624aaaa"
luite commented 5 years ago

thanks for the fix