|Copyright||(c) 2020-2021 Sam May|
The CdText standard technically allows for data encoded as Shift JIS; I am unaware of any discs produced with such data as no member of the libcdio-dev mailing list (or any of the very few other resources) have Japanese imports, but for completion the ability to read that encoding is required. This module provides a light-weight implementation modeled on the Data.Text.Encoding UTF-8 interface.
- data JISChar
- data JISDecodeError = JISDecodeError String (Maybe JISChar)
- data JISEncodeError = JISEncodeError String (Maybe Char)
- decodeMsJIS' :: ByteString -> Either JISDecodeError Text
- decodeMsJISWith :: OnError JISChar Char -> ByteString -> Text
- encodeMsJIS' :: Text -> Either JISEncodeError ByteString
- encodeMsJISWith :: OnError Char ByteString -> Text -> ByteString
The characters which may be represented under the Shift JIS encoding.
Note that this type is only exposed as part of error reporting or recovery
functions, and is not intended as a replacement of
|Bounded JISChar #|
|Enum JISChar #|
Ignores the three invalid single-byte characters
Defined in Data.Text.Encoding.MsJIS
|Eq JISChar #|
|Ord JISChar #|
|Read JISChar #|
|Show JISChar #|
The given one- or two- byte sequence was unable to be decoded; the error may be described by the unstructured text.
|Eq JISDecodeError #|
|Read JISDecodeError #|
|Show JISDecodeError #|
The given character was unable to be serialized in binary form; this is almost certainly due to it not being included in Shift JIS, but the error is described by the unstructured text anyway.
|Eq JISEncodeError #|
|Read JISEncodeError #|
|Show JISEncodeError #|
Transform an unambiguous string into a binary stream according to Microsoft's extension of the Shift JIS encoding scheme.
If the input contains any characters without an associated binary sequence under that scheme, the first such character which triggers the error will be returned instead.