{- 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	 = % (37)

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	 = Ђ (1026)

129	 = Ѓ (1027)

130	 = ‚ (8218)

131	 = ѓ (1107)

132	 = „ (8222)

133	 = … (8230)

134	 = † (8224)

135	 = ‡ (8225)

136	 = € (8364)

137	 = ‰ (8240)

138	 = Љ (1033)

139	 = ‹ (8249)

140	 = Њ (1034)

141	 = Ќ (1036)

142	 = Ћ (1035)

143	 = Џ (1039)

144	 = ђ (1106)

145	 = ‘ (8216)

146	 = ’ (8217)

147	 = “ (8220)

148	 = ” (8221)

149	 = • (8226)

150	 = – (8211)

151	 = — (8212)

152

153	 = ™ (8482)

154	 = љ (1113)

155	 = › (8250)

156	 = њ (1114)

157	 = ќ (1116)

158	 = ћ (1115)

159	 = џ (1119)

160	 =   (160)

161	 = Ў (1038)

162	 = ў (1118)

163	 = Ј (1032)

164	 = ¤ (164)

165	 = Ґ (1168)

166	 = ¦ (166)

167	 = § (167)

168	 = Ё (1025)

169	 = © (169)

170	 = Є (1028)

171	 = « (171)

172	 = ¬ (172)

173	 = ­ (173)

174	 = ® (174)

175	 = Ї (1031)

176	 = ° (176)

177	 = ± (177)

178	 = І (1030)

179	 = і (1110)

180	 = ґ (1169)

181	 = µ (181)

182	 = ¶ (182)

183	 = · (183)

184	 = ё (1105)

185	 = № (8470)

186	 = є (1108)

187	 = » (187)

188	 = ј (1112)

189	 = Ѕ (1029)

190	 = ѕ (1109)

191	 = ї (1111)

192	 = А (1040)

193	 = Б (1041)

194	 = В (1042)

195	 = Г (1043)

196	 = Д (1044)

197	 = Е (1045)

198	 = Ж (1046)

199	 = З (1047)

200	 = И (1048)

201	 = Й (1049)

202	 = К (1050)

203	 = Л (1051)

204	 = М (1052)

205	 = Н (1053)

206	 = О (1054)

207	 = П (1055)

208	 = Р (1056)

209	 = С (1057)

210	 = Т (1058)

211	 = У (1059)

212	 = Ф (1060)

213	 = Х (1061)

214	 = Ц (1062)

215	 = Ч (1063)

216	 = Ш (1064)

217	 = Щ (1065)

218	 = Ъ (1066)

219	 = Ы (1067)

220	 = Ь (1068)

221	 = Э (1069)

222	 = Ю (1070)

223	 = Я (1071)

224	 = а (1072)

225	 = б (1073)

226	 = в (1074)

227	 = г (1075)

228	 = д (1076)

229	 = е (1077)

230	 = ж (1078)

231	 = з (1079)

232	 = и (1080)

233	 = й (1081)

234	 = к (1082)

235	 = л (1083)

236	 = м (1084)

237	 = н (1085)

238	 = о (1086)

239	 = п (1087)

240	 = р (1088)

241	 = с (1089)

242	 = т (1090)

243	 = у (1091)

244	 = ф (1092)

245	 = х (1093)

246	 = ц (1094)

247	 = ч (1095)

248	 = ш (1096)

249	 = щ (1097)

250	 = ъ (1098)

251	 = ы (1099)

252	 = ь (1100)

253	 = э (1101)

254	 = ю (1102)

255	 = я (1103)
 -}
module Data.Encoding.CP1251(CP1251(..)) 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 CP1251 = CP1251
  deriving (Show,Eq,Typeable)

decoding_array_CP1251 = 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\37\0\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\2\4\0\0\3\4\0\0\26\32\0\0\83\4\0\0\30\32\0\0\38\32\0\0\32\32\0\0\33\32\0\0\172\32\0\0\48\32\0\0\9\4\0\0\57\32\0\0\10\4\0\0\12\4\0\0\11\4\0\0\15\4\0\0\82\4\0\0\24\32\0\0\25\32\0\0\28\32\0\0\29\32\0\0\34\32\0\0\19\32\0\0\20\32\0\0\255\255\255\255\34\33\0\0\89\4\0\0\58\32\0\0\90\4\0\0\92\4\0\0\91\4\0\0\95\4\0\0\160\0\0\0\14\4\0\0\94\4\0\0\8\4\0\0\164\0\0\0\144\4\0\0\166\0\0\0\167\0\0\0\1\4\0\0\169\0\0\0\4\4\0\0\171\0\0\0\172\0\0\0\173\0\0\0\174\0\0\0\7\4\0\0\176\0\0\0\177\0\0\0\6\4\0\0\86\4\0\0\145\4\0\0\181\0\0\0\182\0\0\0\183\0\0\0\81\4\0\0\22\33\0\0\84\4\0\0\187\0\0\0\88\4\0\0\5\4\0\0\85\4\0\0\87\4\0\0\16\4\0\0\17\4\0\0\18\4\0\0\19\4\0\0\20\4\0\0\21\4\0\0\22\4\0\0\23\4\0\0\24\4\0\0\25\4\0\0\26\4\0\0\27\4\0\0\28\4\0\0\29\4\0\0\30\4\0\0\31\4\0\0\32\4\0\0\33\4\0\0\34\4\0\0\35\4\0\0\36\4\0\0\37\4\0\0\38\4\0\0\39\4\0\0\40\4\0\0\41\4\0\0\42\4\0\0\43\4\0\0\44\4\0\0\45\4\0\0\46\4\0\0\47\4\0\0\48\4\0\0\49\4\0\0\50\4\0\0\51\4\0\0\52\4\0\0\53\4\0\0\54\4\0\0\55\4\0\0\56\4\0\0\57\4\0\0\58\4\0\0\59\4\0\0\60\4\0\0\61\4\0\0\62\4\0\0\63\4\0\0\64\4\0\0\65\4\0\0\66\4\0\0\67\4\0\0\68\4\0\0\69\4\0\0\70\4\0\0\71\4\0\0\72\4\0\0\73\4\0\0\74\4\0\0\75\4\0\0\76\4\0\0\77\4\0\0\78\4\0\0\79\4\0\0"#

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

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