namespace {
-const unsigned map_size=8;
+const unsigned map_size = 8;
const int mapping[map_size*2]=
{
}
+
namespace Msp {
namespace Codecs {
void Iso885915::Encoder::encode_char(UnicodeChar ch, string &buf)
{
- int tch=transform_mapping_or_direct(mapping, map_size, ch, false);
+ int tch = transform_mapping_or_direct(mapping, map_size, ch, false);
if(tch<0 || tch>0xFF)
error(ch, buf, "Can't express character in ISO-8859-15");
else
- buf+=tch;
+ buf += tch;
}
void Iso885915::Encoder::transliterate(UnicodeChar, string &buf)
{
- buf+='?';
+ buf += '?';
}
if(i==str.end())
return error("No input");
- unsigned char ch=*i;
- int tch=transform_mapping_or_direct(mapping, map_size, ch, true);
+ unsigned char ch = *i;
+ int tch = transform_mapping_or_direct(mapping, map_size, ch, true);
UnicodeChar result;
if(tch==-1)
- result=error("Undefined ISO-8859-15 character");
+ result = error("Undefined ISO-8859-15 character");
else
- result=tch;
+ result = tch;
++i;
return result;