| ... | @@ -32,7 +32,7 @@ The Haskell'98 Report claims the language uses Unicode. Most of the rest of the |
... | @@ -32,7 +32,7 @@ The Haskell'98 Report claims the language uses Unicode. Most of the rest of the |
|
|
|
|
|
|
|
|
|
|
|
|
The Haskell 98 Report claims that Haskell source code uses the Unicode character set.
|
|
The Haskell 98 Report claims that Haskell source code uses the Unicode character set.
|
|
|
No existing implementation allows unrestricted use of the Unicode character set in Haskell source. Most treat source code as Latin-1. If Unicode were allowed, how would implementations know which encoding was used?
|
|
Jhc is the only implementation that allows unrestricted use of the Unicode character set in Haskell source. Most treat source code as Latin-1 (except jhc which treats it as utf8). If Unicode were allowed, how would implementations know which encoding was used?
|
|
|
|
|
|
|
|
|
|
|
|
|
Some things we could do:
|
|
Some things we could do:
|
| ... | @@ -41,6 +41,7 @@ Some things we could do: |
... | @@ -41,6 +41,7 @@ Some things we could do: |
|
|
- Allow Unicode, defining a portable form (the \\uNNNN escapes in Haskell 1.4 were an attempt at this).
|
|
- Allow Unicode, defining a portable form (the \\uNNNN escapes in Haskell 1.4 were an attempt at this).
|
|
|
- Allow Unicode, with a mechanism for specifying encoding.
|
|
- Allow Unicode, with a mechanism for specifying encoding.
|
|
|
- Allow Unicode only in some places, e.g. character and string literals.
|
|
- Allow Unicode only in some places, e.g. character and string literals.
|
|
|
|
- Use the locale standard on the system. this is arguably the correct thing all progams that read text files should always do. (we could specify that all compilers must support utf8 too)
|
|
|
|
|
|
|
|
## The Char type
|
|
## The Char type
|
|
|
|
|
|
| ... | | ... | |