]> git.tdb.fi Git - libs/core.git/blobdiff - source/stringcodec/windows1252.cpp
Rename UnicodeChar to unichar
[libs/core.git] / source / stringcodec / windows1252.cpp
index 33527e4c92c3fea8df76276a04562f7f9c546450..531860bca47331a94f2dcae77be1f240573ac209 100644 (file)
@@ -16,9 +16,9 @@ unsigned short table[32]=
 
 
 namespace Msp {
-namespace Codecs {
+namespace StringCodec {
 
-void Windows1252::Encoder::encode_char(UnicodeChar ch, string &buf)
+void Windows1252::Encoder::encode_char(unichar ch, string &buf)
 {
        if((ch>=0 && ch<=0x7F) || (ch>=0xA0 && ch<=0xFF))
                buf += ch;
@@ -35,19 +35,19 @@ void Windows1252::Encoder::encode_char(UnicodeChar ch, string &buf)
        }
 }
 
-void Windows1252::Encoder::transliterate(UnicodeChar, string &buf)
+void Windows1252::Encoder::transliterate(unichar, string &buf)
 {
        buf += '?';
 }
 
 
-UnicodeChar Windows1252::Decoder::decode_char(const string &str, string::const_iterator &i)
+unichar Windows1252::Decoder::decode_char(const string &str, string::const_iterator &i)
 {
        if(i==str.end())
                return error("No input");
 
        int ch = static_cast<unsigned char>(*i);
-       UnicodeChar result;
+       unichar result;
        if(ch>=0x80 && ch<=0x9F)
        {
                result = table[ch-0x80];
@@ -61,5 +61,5 @@ UnicodeChar Windows1252::Decoder::decode_char(const string &str, string::const_i
        return result;
 }
 
-} // namespace Codecs
+} // namespace StringCodec
 } // namespace Msp