Commit Graph

50 Commits

Author SHA1 Message Date
Henning Guenther
98ece426d9 Document Encoding base classes
Ignore-this: 6a7f57460edd3a888d5f214c9aa115b

darcs-hash:20090828223146-a4fee-0e54f4127ceef0ddc6bfd938813b030d5b2faf19
2009-08-28 15:31:46 -07:00
Henning Guenther
94b3b3f7d9 Various MSDOS copepages added
Ignore-this: 6adc7c3ba146e7c41d3178241c173751

darcs-hash:20090828222844-a4fee-08926d980f1ffc4287b992a528855d03dd2d7bed
2009-08-28 15:28:44 -07:00
Henning Guenther
2a2630625c Add Show instance for DynEncoding
Ignore-this: 358ed8859aebfc1e9493150fbec0ff40

darcs-hash:20090828213441-a4fee-83066014b6a8b4d92c41c8bda7a36ea5c141673b
2009-08-28 14:34:41 -07:00
Henning Guenther
037505e3d6 Documentation for ISO8859-1
Ignore-this: 2c8c38a574a39170f67a4f043406f081

darcs-hash:20090813043833-a4fee-65a4a6eba1ca3d6ad04b69ec9b9ce805edb8e302
2009-08-12 21:38:33 -07:00
Henning Guenther
414adf4e7d Removed obsolete template code
Ignore-this: d555a44d9f5cf27c03f7b5ddd3a6ef4a

darcs-hash:20090813043811-a4fee-6ce046900453472765daf718ffe5446cf65ce4e7
2009-08-12 21:38:11 -07:00
Henning Guenther
73eefc2838 Removed obsolete import
Ignore-this: 1dbf628a27fb6b26d38dbf30e17f3a5e

darcs-hash:20090813024342-a4fee-54437c7ba6ea62ac454a6d1d4dc31c721b227d9f
2009-08-12 19:43:42 -07:00
Henning Guenther
39af34b0a3 Added Preprocessor for XML mappings and normal mappings
Ignore-this: dc0902f526ceb99db528e14c9e3ad563

darcs-hash:20090813024109-a4fee-447c0ff194c227ed919d6eef0f7824e63276183e
2009-08-12 19:41:09 -07:00
Henning Guenther
6101ee16ae Switch from Template-based code generating to text-based
Ignore-this: f58ceb5e1068be132b0a67a851b096f4
This has two advantages:
1. TemplateHaskell is painfully slow. There, I said it.
2. TemplateHaskell doesn't yet support some extensions that can be usefull for this library. Specifically the MagicHash extension.

darcs-hash:20090813023321-a4fee-0da13d0da6454f6ba3bd111ed6b80268d9e1b45c
2009-08-12 19:33:21 -07:00
Henning Guenther
1ad8755a80 Fix chr calling on big numbers in UTF8
Ignore-this: 3a7650c4b75691b79b082db6bddd5b8b

darcs-hash:20090813022455-a4fee-1989c74eb7f7a9daa87f902da138c45185ea520e
2009-08-12 19:24:55 -07:00
Henning Guenther
46d5eb8efd Generalized column skipping in code tables
Ignore-this: dbcc883c561f2f074dd4739387dd3f43

darcs-hash:20090306150105-a4fee-b4d441cd38c758c803732e0c74a86a53d8db9c28
2009-03-06 07:01:05 -08:00
Henning Guenther
fb5111d7dc ISO2022JP encoding
Ignore-this: fa857024fa249fff451f5c024962484e

darcs-hash:20090303125641-a4fee-ac96e5788bb6b3cdf61f2e19f4bd19ece710e24b
2009-03-03 04:56:41 -08:00
Henning Guenther
7f65298d3a ISO2022 encoding
Ignore-this: 6058e1ef5776d1cdf70c32e533252b5e

darcs-hash:20090303125452-a4fee-d9a0533bf8215100a923f6552775048c2844a240
2009-03-03 04:54:52 -08:00
Henning Guenther
693010654c Added JISX0212
Ignore-this: 731c592d836554408bd7350b20a623a3

darcs-hash:20090303125335-a4fee-48fb4fa694f42bae3ba57834c3e52966c414bb55
2009-03-03 04:53:35 -08:00
Henning Guenther
53d723d61e Added MacOSRoman
Ignore-this: 9e8a302ffb6510ac490e71274d831231

darcs-hash:20090303125116-a4fee-ab486e72484d1ab9ac33dedc0ab2150ad05d2714
2009-03-03 04:51:16 -08:00
Henning Guenther
3270e03da1 Made decoding array lookup safe
Ignore-this: 346535974ae363daf4ade7e22ed48ad7

darcs-hash:20090226144653-a4fee-42808f15a3bab3fa1712ab12d8b0cfb54ff96aad
2009-02-26 06:46:53 -08:00
Henning Guenther
6eb2d51ee2 Decoding arrays are unboxed (thus strict) now
darcs-hash:20090225075818-a4fee-f558e4bde484482e0987c8623c3b2ec54ac4e394
2009-02-24 23:58:18 -08:00
Henning Guenther
3b3f042529 Fix case and indentation
darcs-hash:20090225073306-a4fee-a93aac7f0d47124c91a6b0a4899e9a96649d009d
2009-02-24 23:33:06 -08:00
Henning Guenther
0b18661553 Added JISX0208 encoding file
darcs-hash:20090225040351-a4fee-c061eed83f2d97c98a4ed56e75f58c4bf0f9b057
2009-02-24 20:03:51 -08:00
Henning Guenther
d12097c7a1 Removed useless comment
darcs-hash:20090225040233-a4fee-16dcf1f9cbc42c7e379f8ba83cb5f16ff1832d2c
2009-02-24 20:02:33 -08:00
Henning Guenther
7b2af16c03 Added fetchAhead function
darcs-hash:20090225040209-a4fee-816a8cef5c9edeea5b35fd5fe75ca5b0ec36ee17
2009-02-24 20:02:09 -08:00
Henning Guenther
5528bf1a55 Added encodeable function
darcs-hash:20090225040044-a4fee-67753f6d651b18d5bd3a28340ea8f5d7ea7eb90d
2009-02-24 20:00:44 -08:00
Henning Guenther
1543e75f50 Added Eq instance for DynEncoding
This envolves adding the requirement, that every Encoding must also be an instance of Eq and Typeable to go into DynEncoding.

darcs-hash:20090225035150-a4fee-c7d902e28313929ee9ffe0c6a6b60d8ff4704ae9
2009-02-24 19:51:50 -08:00
Henning Guenther
b95bfe9be4 JIS X 0208 encoding
darcs-hash:20090223182459-a4fee-98ced8f8b7bac594dc6510eeecb6bea8c51a6090
2009-02-23 10:24:59 -08:00
Henning Guenther
0398f66695 Remove Hack Warning
darcs-hash:20090222183603-a4fee-b9435eb4652e49092c8c3b875e72006ff03b9de2
2009-02-22 10:36:03 -08:00
Henning Guenther
9344038d33 JIS X 0201 encoding
darcs-hash:20090222182246-a4fee-903520e4098e6809877fc55568207f40ebd6fda9
2009-02-22 10:22:46 -08:00
Henning Guenther
eeee054f1e Rewrite to support more sources and changing the encoding dynamically
Now it's possible to change the character encoding while de-/encoding.
Also, it's possible to use any data structure as a source or target of the de-/encoding process.

darcs-hash:20090221203100-a4fee-6da31f2e37c30a3f5cd5f10af71984209488bb0b
2009-02-21 12:31:00 -08:00
Khudyakov Alexey
8b16078e5e Fix for KOI8-R and KOI8-U encodings
Characters which should be encoded in [128..255] range were encoded into
[0..127] range.
** END OF DESCRIPTION***

Place the long patch description above the ***END OF DESCRIPTION*** marker.
The first line of this file will be the patch name.

This patch contains the following changes:

M ./Data/Encoding/KOI8R.hs -1 +1
M ./Data/Encoding/KOI8U.hs -1 +1

darcs-hash:20090118232224-7ba7e-c685a571f6ac9a9ca78725a80040e842f4a7e5a7
2009-01-18 15:22:24 -08:00
Henning Guenther
6c5011aaa3 Added KOI8U encoding
darcs-hash:20080120213322-a4fee-752cc3f3ec4e7a01e5bbf93bad08a88ca3cb3a5b
2008-01-20 13:33:22 -08:00
Henning Guenther
42cdeecc96 Watch out for overflows in BootString
darcs-hash:20080120013020-a4fee-282b60f860817f1f5994e4a867980d02f8020609
2008-01-19 17:30:20 -08:00
Henning Guenther
8d740cf88a Refactored getT out of BootString
darcs-hash:20080120010829-a4fee-7d617d76cc2e67b0e33662510c9736367396d2ea
2008-01-19 17:08:29 -08:00
Henning Guenther
1510b86c10 BootString throws regular exceptions now
darcs-hash:20080120005332-a4fee-9c09d47827db967d396c155a09cfa719d05f2c27
2008-01-19 16:53:32 -08:00
Henning Guenther
3b9a84b979 Fixed BootString error
darcs-hash:20080120002117-a4fee-6b3d8f1bc4dece6960c9319387f5fccca41620b4
2008-01-19 16:21:17 -08:00
Henning Guenther
59a8526727 Better detection of UTF16 endianess
darcs-hash:20080119232705-a4fee-ff06e72d08068de9566b37cbc3e31f1e944162ea
2008-01-19 15:27:05 -08:00
Henning Guenther
529953686a Fixed UTF16 decoding error
darcs-hash:20080116013924-a4fee-802818436b13cc8d3df5d772074a78cc685ccd10
2008-01-15 17:39:24 -08:00
Henning Guenther
5a0a697cb8 Implemented UTF32BE and LE
darcs-hash:20080115233419-a4fee-391b20ca239a6e59a6146f00ae084d0ff94ee908
2008-01-15 15:34:19 -08:00
Henning Guenther
e849ef1404 More documentation for encodings
darcs-hash:20080115224955-a4fee-339ceea9439723fa09096abab221f2ad735c8905
2008-01-15 14:49:55 -08:00
Henning Guenther
a56e3cfb8a Made BootString instance of Show, Eq and Typeable
darcs-hash:20080102145747-a4fee-af290555ad724b015336c8f08595ef95990877e6
2008-01-02 06:57:47 -08:00
Henning Guenther
0e4f3e9d2b Made DynEncoding an instance of Eq
darcs-hash:20080101224724-a4fee-4ff48f9729414a347da55cb95223429baf0587c1
2008-01-01 14:47:24 -08:00
Henning Guenther
82b0a26ec9 Implemented Unit Test Framework
darcs-hash:20071231114727-a4fee-7bb01bb4f8b044c8cf29a84cb0f64a392c7f0588
2007-12-31 03:47:27 -08:00
Henning Guenther
d1e1b3f5df Implemented a strict UTF8 decoder
This means mainly not accepting overlong representations and not
allowing invalid bitmasks.

darcs-hash:20071231114623-a4fee-0006712f7f3e5db565b50d38eeb32674e063c49e
2007-12-31 03:46:23 -08:00
Henning Guenther
7daec5bb6b Fixed UTF8 decoding bug
There was an exception if trying to decode a sequence that had to have 4
bytes but had less.

darcs-hash:20071230234632-a4fee-d10fca90840b37952a5d4a4c31a1c8e4900f0f93
2007-12-30 15:46:32 -08:00
Henning Guenther
971927c91f Made extensions explicit
darcs-hash:20071229003551-a4fee-f01193be732b8f3f5085232f922490cd5b48706a
2007-12-28 16:35:51 -08:00
Henning Guenther
7e291fcefe Convert to new cabal and bytestring interfaces
darcs-hash:20071210234921-a4fee-251367abbc4d99d72f425b2d1b69ce2c36f32572
2007-12-10 15:49:21 -08:00
Henning Guenther
5b02009636 Removed dependence on Data.ByteString.Internal
darcs-hash:20071105215225-a4fee-c0b55a368ffc296c7c784156f8340cb4586f1444
2007-11-05 13:52:25 -08:00
Henning Guenther
6b82f1bb71 Changed UTF16 to support big/little endian encoding
darcs-hash:20071105213105-a4fee-f3d5a91bee421e5e6c2d1d44787a421bb2d07b72
2007-11-05 13:31:05 -08:00
Henning Guenther
cb81698b7e Derived all encodings from Show
This way, we can declare DynEncoding an instance of Show

darcs-hash:20070827020833-a4fee-a84635bf911573022b780c17b2085ff814302b3e
2007-08-26 19:08:33 -07:00
Henning Guenther
1e3524e478 Added Template Haskell helper functions
darcs-hash:20070823120526-a4fee-4d3fcf18768f5be81a81309d003f991c269ca136
2007-08-23 05:05:26 -07:00
Henning Guenther
dc47984bf6 Implemented GB18030 encoding
This is a bit of a hack, because the static lookup data this encoding requires brings template haskell to it's knees. So I've got a program that generates a haskell module file from the XML mapping.

darcs-hash:20070823034759-a4fee-883359c8951d4376fc2d783cd7be352d6c5b2111
2007-08-22 20:47:59 -07:00
Henning Guenther
96738efeeb Documentation for a few encodings
darcs-hash:20070802095455-a4fee-8761245eb32db2cc33a80d981eaebab10c2af6a3
2007-08-02 02:54:55 -07:00
Henning Guenther
496761301f Initial commit
darcs-hash:20070802003505-a4fee-97432a586ed2453061ef246d1e7a81fec35d1bac
2007-08-01 17:35:05 -07:00