{- This file has been auto-generated. Do not edit it. -}
{-# LANGUAGE MagicHash,DeriveDataTypeable #-}
{- |

0	 = � (0)

1	 =  (1)

2	 =  (2)

3	 =  (3)

4	 =  (4)

5	 =  (5)

6	 =  (6)

7	 =  (7)

8	 =  (8)

9	 = 	 (9)

10	 = 
 (10)

11	 =  (11)

12	 =  (12)

13	 = 
 (13)

14	 =  (14)

15	 =  (15)

16	 =  (16)

17	 =  (17)

18	 =  (18)

19	 =  (19)

20	 =  (20)

21	 =  (21)

22	 =  (22)

23	 =  (23)

24	 =  (24)

25	 =  (25)

26	 =  (26)

27	 =  (27)

28	 =  (28)

29	 =  (29)

30	 =  (30)

31	 =  (31)

32	 =   (32)

33	 = ! (33)

34	 = " (34)

35	 = # (35)

36	 = $ (36)

37	 = ٪ (1642)

38	 = & (38)

39	 = ' (39)

40	 = ( (40)

41	 = ) (41)

42	 = * (42)

43	 = + (43)

44	 = , (44)

45	 = - (45)

46	 = . (46)

47	 = / (47)

48	 = 0 (48)

49	 = 1 (49)

50	 = 2 (50)

51	 = 3 (51)

52	 = 4 (52)

53	 = 5 (53)

54	 = 6 (54)

55	 = 7 (55)

56	 = 8 (56)

57	 = 9 (57)

58	 = : (58)

59	 = &#59; (59)

60	 = < (60)

61	 = = (61)

62	 = > (62)

63	 = ? (63)

64	 = @ (64)

65	 = A (65)

66	 = B (66)

67	 = C (67)

68	 = D (68)

69	 = E (69)

70	 = F (70)

71	 = G (71)

72	 = H (72)

73	 = I (73)

74	 = J (74)

75	 = K (75)

76	 = L (76)

77	 = M (77)

78	 = N (78)

79	 = O (79)

80	 = P (80)

81	 = Q (81)

82	 = R (82)

83	 = S (83)

84	 = T (84)

85	 = U (85)

86	 = V (86)

87	 = W (87)

88	 = X (88)

89	 = Y (89)

90	 = Z (90)

91	 = [ (91)

92	 = \ (92)

93	 = ] (93)

94	 = ^ (94)

95	 = _ (95)

96	 = ` (96)

97	 = a (97)

98	 = b (98)

99	 = c (99)

100	 = d (100)

101	 = e (101)

102	 = f (102)

103	 = g (103)

104	 = h (104)

105	 = i (105)

106	 = j (106)

107	 = k (107)

108	 = l (108)

109	 = m (109)

110	 = n (110)

111	 = o (111)

112	 = p (112)

113	 = q (113)

114	 = r (114)

115	 = s (115)

116	 = t (116)

117	 = u (117)

118	 = v (118)

119	 = w (119)

120	 = x (120)

121	 = y (121)

122	 = z (122)

123	 = { (123)

124	 = | (124)

125	 = } (125)

126	 = ~ (126)

127	 =  (127)

128	 = ° (176)

129	 = · (183)

130	 = ∙ (8729)

131	 = √ (8730)

132	 = ▒ (9618)

133	 = ─ (9472)

134	 = │ (9474)

135	 = ┼ (9532)

136	 = ┤ (9508)

137	 = ┬ (9516)

138	 = ├ (9500)

139	 = ┴ (9524)

140	 = ┐ (9488)

141	 = ┌ (9484)

142	 = └ (9492)

143	 = ┘ (9496)

144	 = β (946)

145	 = ∞ (8734)

146	 = φ (966)

147	 = ± (177)

148	 = ½ (189)

149	 = ¼ (188)

150	 = ≈ (8776)

151	 = « (171)

152	 = » (187)

153	 = ﻷ (65271)

154	 = ﻸ (65272)

155

156

157	 = ﻻ (65275)

158	 = ﻼ (65276)

159

160	 =   (160)

161	 = ­ (173)

162	 = ﺂ (65154)

163	 = £ (163)

164	 = ¤ (164)

165	 = ﺄ (65156)

166

167

168	 = ﺎ (65166)

169	 = ﺏ (65167)

170	 = ﺕ (65173)

171	 = ﺙ (65177)

172	 = ، (1548)

173	 = ﺝ (65181)

174	 = ﺡ (65185)

175	 = ﺥ (65189)

176	 = ٠ (1632)

177	 = ١ (1633)

178	 = ٢ (1634)

179	 = ٣ (1635)

180	 = ٤ (1636)

181	 = ٥ (1637)

182	 = ٦ (1638)

183	 = ٧ (1639)

184	 = ٨ (1640)

185	 = ٩ (1641)

186	 = ﻑ (65233)

187	 = ؛ (1563)

188	 = ﺱ (65201)

189	 = ﺵ (65205)

190	 = ﺹ (65209)

191	 = ؟ (1567)

192	 = ¢ (162)

193	 = ﺀ (65152)

194	 = ﺁ (65153)

195	 = ﺃ (65155)

196	 = ﺅ (65157)

197	 = ﻊ (65226)

198	 = ﺋ (65163)

199	 = ﺍ (65165)

200	 = ﺑ (65169)

201	 = ﺓ (65171)

202	 = ﺗ (65175)

203	 = ﺛ (65179)

204	 = ﺟ (65183)

205	 = ﺣ (65187)

206	 = ﺧ (65191)

207	 = ﺩ (65193)

208	 = ﺫ (65195)

209	 = ﺭ (65197)

210	 = ﺯ (65199)

211	 = ﺳ (65203)

212	 = ﺷ (65207)

213	 = ﺻ (65211)

214	 = ﺿ (65215)

215	 = ﻁ (65217)

216	 = ﻅ (65221)

217	 = ﻋ (65227)

218	 = ﻏ (65231)

219	 = ¦ (166)

220	 = ¬ (172)

221	 = ÷ (247)

222	 = × (215)

223	 = ﻉ (65225)

224	 = ـ (1600)

225	 = ﻓ (65235)

226	 = ﻗ (65239)

227	 = ﻛ (65243)

228	 = ﻟ (65247)

229	 = ﻣ (65251)

230	 = ﻧ (65255)

231	 = ﻫ (65259)

232	 = ﻭ (65261)

233	 = ﻯ (65263)

234	 = ﻳ (65267)

235	 = ﺽ (65213)

236	 = ﻌ (65228)

237	 = ﻎ (65230)

238	 = ﻍ (65229)

239	 = ﻡ (65249)

240	 = ﹽ (65149)

241	 = ّ (1617)

242	 = ﻥ (65253)

243	 = ﻩ (65257)

244	 = ﻬ (65260)

245	 = ﻰ (65264)

246	 = ﻲ (65266)

247	 = ﻐ (65232)

248	 = ﻕ (65237)

249	 = ﻵ (65269)

250	 = ﻶ (65270)

251	 = ﻝ (65245)

252	 = ﻙ (65241)

253	 = ﻱ (65265)

254	 = ■ (9632)

255
 -}
module Data.Encoding.CP864(CP864(..)) where

import Data.Encoding.Base
import Data.Encoding.ByteSource
import Data.Encoding.ByteSink
import Data.Encoding.Exception
import Data.CharMap
import Data.Array.Static
import Data.Map.Static
import Control.Throws
import Prelude hiding (lookup)
import Data.Word

import Data.Typeable

data CP864 = CP864
  deriving (Show,Eq,Typeable)

decoding_array_CP864 = StaticArray (0) (255) "\0\0\0\0\1\0\0\0\2\0\0\0\3\0\0\0\4\0\0\0\5\0\0\0\6\0\0\0\7\0\0\0\8\0\0\0\9\0\0\0\10\0\0\0\11\0\0\0\12\0\0\0\13\0\0\0\14\0\0\0\15\0\0\0\16\0\0\0\17\0\0\0\18\0\0\0\19\0\0\0\20\0\0\0\21\0\0\0\22\0\0\0\23\0\0\0\24\0\0\0\25\0\0\0\26\0\0\0\27\0\0\0\28\0\0\0\29\0\0\0\30\0\0\0\31\0\0\0\32\0\0\0\33\0\0\0\34\0\0\0\35\0\0\0\36\0\0\0\106\6\0\0\38\0\0\0\39\0\0\0\40\0\0\0\41\0\0\0\42\0\0\0\43\0\0\0\44\0\0\0\45\0\0\0\46\0\0\0\47\0\0\0\48\0\0\0\49\0\0\0\50\0\0\0\51\0\0\0\52\0\0\0\53\0\0\0\54\0\0\0\55\0\0\0\56\0\0\0\57\0\0\0\58\0\0\0\59\0\0\0\60\0\0\0\61\0\0\0\62\0\0\0\63\0\0\0\64\0\0\0\65\0\0\0\66\0\0\0\67\0\0\0\68\0\0\0\69\0\0\0\70\0\0\0\71\0\0\0\72\0\0\0\73\0\0\0\74\0\0\0\75\0\0\0\76\0\0\0\77\0\0\0\78\0\0\0\79\0\0\0\80\0\0\0\81\0\0\0\82\0\0\0\83\0\0\0\84\0\0\0\85\0\0\0\86\0\0\0\87\0\0\0\88\0\0\0\89\0\0\0\90\0\0\0\91\0\0\0\92\0\0\0\93\0\0\0\94\0\0\0\95\0\0\0\96\0\0\0\97\0\0\0\98\0\0\0\99\0\0\0\100\0\0\0\101\0\0\0\102\0\0\0\103\0\0\0\104\0\0\0\105\0\0\0\106\0\0\0\107\0\0\0\108\0\0\0\109\0\0\0\110\0\0\0\111\0\0\0\112\0\0\0\113\0\0\0\114\0\0\0\115\0\0\0\116\0\0\0\117\0\0\0\118\0\0\0\119\0\0\0\120\0\0\0\121\0\0\0\122\0\0\0\123\0\0\0\124\0\0\0\125\0\0\0\126\0\0\0\127\0\0\0\176\0\0\0\183\0\0\0\25\34\0\0\26\34\0\0\146\37\0\0\0\37\0\0\2\37\0\0\60\37\0\0\36\37\0\0\44\37\0\0\28\37\0\0\52\37\0\0\16\37\0\0\12\37\0\0\20\37\0\0\24\37\0\0\178\3\0\0\30\34\0\0\198\3\0\0\177\0\0\0\189\0\0\0\188\0\0\0\72\34\0\0\171\0\0\0\187\0\0\0\247\254\0\0\248\254\0\0\255\255\255\255\255\255\255\255\251\254\0\0\252\254\0\0\255\255\255\255\160\0\0\0\173\0\0\0\130\254\0\0\163\0\0\0\164\0\0\0\132\254\0\0\255\255\255\255\255\255\255\255\142\254\0\0\143\254\0\0\149\254\0\0\153\254\0\0\12\6\0\0\157\254\0\0\161\254\0\0\165\254\0\0\96\6\0\0\97\6\0\0\98\6\0\0\99\6\0\0\100\6\0\0\101\6\0\0\102\6\0\0\103\6\0\0\104\6\0\0\105\6\0\0\209\254\0\0\27\6\0\0\177\254\0\0\181\254\0\0\185\254\0\0\31\6\0\0\162\0\0\0\128\254\0\0\129\254\0\0\131\254\0\0\133\254\0\0\202\254\0\0\139\254\0\0\141\254\0\0\145\254\0\0\147\254\0\0\151\254\0\0\155\254\0\0\159\254\0\0\163\254\0\0\167\254\0\0\169\254\0\0\171\254\0\0\173\254\0\0\175\254\0\0\179\254\0\0\183\254\0\0\187\254\0\0\191\254\0\0\193\254\0\0\197\254\0\0\203\254\0\0\207\254\0\0\166\0\0\0\172\0\0\0\247\0\0\0\215\0\0\0\201\254\0\0\64\6\0\0\211\254\0\0\215\254\0\0\219\254\0\0\223\254\0\0\227\254\0\0\231\254\0\0\235\254\0\0\237\254\0\0\239\254\0\0\243\254\0\0\189\254\0\0\204\254\0\0\206\254\0\0\205\254\0\0\225\254\0\0\125\254\0\0\81\6\0\0\229\254\0\0\233\254\0\0\236\254\0\0\240\254\0\0\242\254\0\0\208\254\0\0\213\254\0\0\245\254\0\0\246\254\0\0\221\254\0\0\217\254\0\0\241\254\0\0\160\37\0\0\255\255\255\255"#

encoding_map_CP864 :: CharMap
encoding_map_CP864 = LeafMap1 (StaticMap (StaticArray (1) (250) "\160\0\0\0\64\0\0\0\149\254\0\0\31\0\0\0\96\0\0\0\105\6\0\0\209\254\0\0\15\0\0\0\48\0\0\0\80\0\0\0\112\0\0\0\178\3\0\0\60\37\0\0\181\254\0\0\239\254\0\0\7\0\0\0\23\0\0\0\40\0\0\0\56\0\0\0\72\0\0\0\88\0\0\0\104\0\0\0\120\0\0\0\176\0\0\0\97\6\0\0\12\37\0\0\132\254\0\0\165\254\0\0\201\254\0\0\225\254\0\0\247\254\0\0\3\0\0\0\11\0\0\0\19\0\0\0\27\0\0\0\35\0\0\0\44\0\0\0\52\0\0\0\60\0\0\0\68\0\0\0\76\0\0\0\84\0\0\0\92\0\0\0\100\0\0\0\108\0\0\0\116\0\0\0\124\0\0\0\166\0\0\0\188\0\0\0\31\6\0\0\101\6\0\0\30\34\0\0\28\37\0\0\128\254\0\0\142\254\0\0\157\254\0\0\173\254\0\0\189\254\0\0\205\254\0\0\217\254\0\0\233\254\0\0\243\254\0\0\251\254\0\0\1\0\0\0\5\0\0\0\9\0\0\0\13\0\0\0\17\0\0\0\21\0\0\0\25\0\0\0\29\0\0\0\33\0\0\0\38\0\0\0\42\0\0\0\46\0\0\0\50\0\0\0\54\0\0\0\58\0\0\0\62\0\0\0\66\0\0\0\70\0\0\0\74\0\0\0\78\0\0\0\82\0\0\0\86\0\0\0\90\0\0\0\94\0\0\0\98\0\0\0\102\0\0\0\106\0\0\0\110\0\0\0\114\0\0\0\118\0\0\0\122\0\0\0\126\0\0\0\163\0\0\0\172\0\0\0\183\0\0\0\215\0\0\0\12\6\0\0\81\6\0\0\99\6\0\0\103\6\0\0\25\34\0\0\0\37\0\0\20\37\0\0\44\37\0\0\160\37\0\0\130\254\0\0\139\254\0\0\145\254\0\0\153\254\0\0\161\254\0\0\169\254\0\0\177\254\0\0\185\254\0\0\193\254\0\0\203\254\0\0\207\254\0\0\213\254\0\0\221\254\0\0\229\254\0\0\236\254\0\0\241\254\0\0\246\254\0\0\248\254\0\0\252\254\0\0\0\0\0\0\2\0\0\0\4\0\0\0\6\0\0\0\8\0\0\0\10\0\0\0\12\0\0\0\14\0\0\0\16\0\0\0\18\0\0\0\20\0\0\0\22\0\0\0\24\0\0\0\26\0\0\0\28\0\0\0\30\0\0\0\32\0\0\0\34\0\0\0\36\0\0\0\39\0\0\0\41\0\0\0\43\0\0\0\45\0\0\0\47\0\0\0\49\0\0\0\51\0\0\0\53\0\0\0\55\0\0\0\57\0\0\0\59\0\0\0\61\0\0\0\63\0\0\0\65\0\0\0\67\0\0\0\69\0\0\0\71\0\0\0\73\0\0\0\75\0\0\0\77\0\0\0\79\0\0\0\81\0\0\0\83\0\0\0\85\0\0\0\87\0\0\0\89\0\0\0\91\0\0\0\93\0\0\0\95\0\0\0\97\0\0\0\99\0\0\0\101\0\0\0\103\0\0\0\105\0\0\0\107\0\0\0\109\0\0\0\111\0\0\0\113\0\0\0\115\0\0\0\117\0\0\0\119\0\0\0\121\0\0\0\123\0\0\0\125\0\0\0\127\0\0\0\162\0\0\0\164\0\0\0\171\0\0\0\173\0\0\0\177\0\0\0\187\0\0\0\189\0\0\0\247\0\0\0\198\3\0\0\27\6\0\0\64\6\0\0\96\6\0\0\98\6\0\0\100\6\0\0\102\6\0\0\104\6\0\0\106\6\0\0\26\34\0\0\72\34\0\0\2\37\0\0\16\37\0\0\24\37\0\0\36\37\0\0\52\37\0\0\146\37\0\0\125\254\0\0\129\254\0\0\131\254\0\0\133\254\0\0\141\254\0\0\143\254\0\0\147\254\0\0\151\254\0\0\155\254\0\0\159\254\0\0\163\254\0\0\167\254\0\0\171\254\0\0\175\254\0\0\179\254\0\0\183\254\0\0\187\254\0\0\191\254\0\0\197\254\0\0\202\254\0\0\204\254\0\0\206\254\0\0\208\254\0\0\211\254\0\0\215\254\0\0\219\254\0\0\223\254\0\0\227\254\0\0\231\254\0\0\235\254\0\0\237\254\0\0\240\254\0\0\242\254\0\0\245\254\0\0"#) (StaticArray (1) (250) "\160\64\170\31\96\185\186\15\48\80\112\144\135\189\233\7\23\40\56\72\88\104\120\128\177\141\165\175\223\239\153\3\11\19\27\35\44\52\60\68\76\84\92\100\108\116\124\219\149\191\181\145\138\193\168\173\209\235\238\252\243\234\157\1\5\9\13\17\21\25\29\33\38\42\46\50\54\58\62\66\70\74\78\82\86\90\94\98\102\106\110\114\118\122\126\163\220\129\222\172\241\179\183\130\133\142\137\254\162\198\200\171\174\207\188\190\215\217\218\248\251\242\244\253\250\154\158\0\2\4\6\8\10\12\14\16\18\20\22\24\26\28\30\32\34\36\39\41\43\45\47\49\51\53\55\57\59\61\63\65\67\69\71\73\75\77\79\81\83\85\87\89\91\93\95\97\99\101\103\105\107\109\111\113\115\117\119\121\123\125\127\192\164\151\161\147\152\148\221\146\187\224\176\178\180\182\184\37\131\150\134\140\143\136\139\132\240\194\195\196\199\169\201\202\203\204\205\206\208\210\211\212\213\214\216\197\236\237\247\225\226\227\228\229\230\231\232\245\246\249"#))

instance Encoding CP864 where
  decodeChar _ = do
    w <- fetchWord8
    return ()
    case decoding_array_CP864!w of
      Nothing -> throwException $ IllegalCharacter $ fromIntegral w
      Just c -> return c
  encodeChar _ c = mapEncode c encoding_map_CP864
  encodeable _ c = mapMember c encoding_map_CP864