3 This file is part of libmspstrings
4 Copyright © 2006-2007 Mikko Rasa
5 Distributed under the LGPL
8 #include "codecutils.h"
15 const unsigned map_size = 9;
17 const int mapping[map_size*2]=
36 void Iso646Fi::Encoder::encode_char(UnicodeChar ch, string &buf)
38 int tch = transform_mapping_or_direct(mapping, map_size, ch, false);
40 error(ch, buf, "Can't express character in ISO-646-FI");
45 void Iso646Fi::Encoder::transliterate(UnicodeChar, string &buf)
51 UnicodeChar Iso646Fi::Decoder::decode_char(const string &str, string::const_iterator &i)
54 return error("No input");
56 unsigned char ch = *i;
57 int tch = (ch<=0x7F ? transform_mapping_or_direct(mapping, map_size, ch, true) : -1);
61 result = error("Undefined ISO-646-FI character");