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 = 8;
17 const int mapping[map_size*2]=
35 void Iso885915::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-8859-15");
45 void Iso885915::Encoder::transliterate(UnicodeChar, string &buf)
51 UnicodeChar Iso885915::Decoder::decode_char(const string &str, string::const_iterator &i)
54 return error("No input");
56 unsigned char ch = *i;
57 int tch = transform_mapping_or_direct(mapping, map_size, ch, true);
61 result = error("Undefined ISO-8859-15 character");