}
+
namespace Msp {
namespace Codecs {
void Windows1252::Encoder::encode_char(UnicodeChar ch, string &buf)
{
if((ch>=0 && ch<=0x7F) || (ch>=0xA0 && ch<=0xFF))
- buf+=ch;
+ buf += ch;
else
{
for(unsigned i=0; i<32; ++i)
if(table[i]==ch)
{
- buf+=ch;
+ buf += ch;
return;
}
void Windows1252::Encoder::transliterate(UnicodeChar, string &buf)
{
- buf+='?';
+ buf += '?';
}
if(i==str.end())
return error("No input");
- int ch=static_cast<unsigned char>(*i);
+ int ch = static_cast<unsigned char>(*i);
UnicodeChar result;
if(ch>=0x80 && ch<=0x9F)
{
- result=table[ch-0x80];
+ result = table[ch-0x80];
if(result==0)
- result=error("Undefined Windows-1252 character");
+ result = error("Undefined Windows-1252 character");
}
else
- result=ch;
+ result = ch;
++i;
return result;