Haskell source encoding

后端 未结 4 1831
逝去的感伤
逝去的感伤 2021-02-15 19:09

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:49

    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.

提交回复
热议问题