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]=
35 void Iso646Fi::Encoder::encode_char(UnicodeChar ch, string &buf)
37 int tch=transform_mapping_or_direct(mapping, map_size, ch, false);
39 error(ch, buf, "Can't express character in ISO-646-FI");
44 void Iso646Fi::Encoder::transliterate(UnicodeChar, string &buf)
50 UnicodeChar Iso646Fi::Decoder::decode_char(const string &str, string::const_iterator &i)
53 return error("No input");
56 int tch=(ch<=0x7F ? transform_mapping_or_direct(mapping, map_size, ch, true) : -1);
60 result=error("Undefined ISO-646-FI character");