Haskell source encoding

后端 未结 4 881
抹茶落季
抹茶落季 2021-02-15 19:41

The Haskell 2010 Language Report says:

Haskell uses the Unicode [2] character set. However, source programs are currently biased toward the ASCII character set
4条回答
  •  被撕碎了的回忆
    2021-02-15 19:51

    Unicode is character set. UTF-8, UTF-16 etc are the concrete physical encodings of Unicode codepoints. Try to read here. The difference explained pretty well there.

    Cited report's part just states that Haskell sources use Unicode character set. It doesn't state which encoding should be used at all. In other words, it says which characters could appear in the sources, but doesn't say how they could be written in term of plain bytes.

提交回复
热议问题