3 This file is part of libmspstrings
4 Copyright © 2006-2007 Mikko Rasa
5 Distributed under the LGPL
14 char translit_latin1[0x60]=
18 const char *translit_katakana[0x60]=
20 "--", "a", "a", "i", "i", "u", "u", "e", "e", "o", "o",
21 "ka", "ga", "ki", "gi", "ku", "gu", "ke", "ge", "ko", "go",
22 "sa", "za", "si", "zi", "su", "zu", "se", "ze", "so", "zo",
23 "ta", "da", "ti", "di", "tu", "tu", "du", "te", "de", "to", "do",
31 void Ascii::Encoder::encode_char(UnicodeChar ch, string &buf)
34 return error(ch, buf, "Can't express character in ASCII");
39 void Ascii::Encoder::transliterate(UnicodeChar ch, string &buf)
41 if(ch>=0xC0 && ch<=0xC5)
47 else if(ch>=0xC8 && ch<=0xCB)
49 else if(ch>=0xCC && ch<=0xCF)
55 else if((ch>=0xD2 && ch<=0xD7) || ch==0xD9)
59 else if(ch>=0xDA && ch<=0xDC)
67 else if(ch>=0xE0 && ch<=0xE5)
73 else if(ch>=0xE8 && ch<=0xEB)
75 else if(ch>=0xEC && ch<=0xEF)
81 else if((ch>=0xF2 && ch<=0xF7) || ch==0xF9)
85 else if(ch>=0xFA && ch<=0xFC)
98 UnicodeChar Ascii::Decoder::decode_char(const string &str, string::const_iterator &i)
101 return error("No input");
104 UnicodeChar result = error("Undefined ASCII character");
112 } // namespace Codecs