Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,251
    • Issues 5,251
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 583
    • Merge requests 583
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #20191
Closed
Open
Issue created Aug 01, 2021 by Bodigrim@BodigrimDeveloper

Unicode strings are mangled in GHC 9.0.1

Summary

GHC 9.0.1 seems to behave weirdly, when strings contain Unicode characters, while GHC 8.10.5 and HEAD work fine.

@mpickering Is it another manifestation of #19976 (closed)?

Steps to reproduce

{-# OPTIONS_GHC -O1 #-}

import Data.Text ()
import Data.Text.Internal.Fusion (unstream)
import Data.Text.Internal.Fusion.Common (streamList)

main :: IO ()
main = print (unstream (streamList "\65536"))
$ ghc-9.0.1 Unicode.hs && ./Unicode
[1 of 1] Compiling Main             ( Unicode.hs, Unicode.o )
Linking Unicode ...
"\65536\62464\61312"

Expected behavior

I'd expect to have "\65536" back.

Environment

  • GHC version used: 9.0.1
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking