
5 Jan
2008
5 Jan
'08
3:19 p.m.
dave:
On Jan 5, 2008 12:37 AM, Don Stewart <[1]dons@galois.com> wrote:
The most notable change is the instance IsString for strict and lazy bytestrings, enabling bytestrings to be written as direct string literals, without needing 'pack'.
That is, the following is valid:
import Data.ByteString.Char8
main = print ("abcdef" :: ByteString)
What encoding is used?
The 'Data.ByteString.Char8' encodin: -- ... these byte strings are taken to be in the -- subset of Unicode covered by code points 0-255. This covers -- Unicode Basic Latin, Latin-1 Supplement and C0+C1 Controls. You'll need to import Data.ByteString.Char8 to get the instance, so the encoding should be clear in this case. -- Don