]> git.tdb.fi Git - libs/core.git/blobdiff - source/stringcodec/iso2022jp.cpp
Rename UnicodeChar to unichar
[libs/core.git] / source / stringcodec / iso2022jp.cpp
index d9c7ceac147b0e08ccd3e8c3c684dce6cb947722..985451280f42cfd79496963a95716dd59b3d717d 100644 (file)
@@ -1,9 +1,3 @@
-/* $Id$
-
-This file is part of libmspstrings
-Copyright © 2006-2007 Mikko Rasa
-Distributed under the LGPL
-*/
 #include "ascii.h"
 #include "iso2022jp.h"
 #include "jisx0201.h"
@@ -12,9 +6,9 @@ Distributed under the LGPL
 using namespace std;
 
 namespace Msp {
-namespace Codecs {
+namespace StringCodec {
 
-void Iso2022Jp::Encoder::encode_char(UnicodeChar ch, string &buf)
+void Iso2022Jp::Encoder::encode_char(unichar ch, string &buf)
 {
        if(ch>=0 && ch<=0x7F && ch!=0x5C && ch!=0x7E)
        {
@@ -74,7 +68,7 @@ void Iso2022Jp::Encoder::switch_mode(Mode m, string &buf)
        }
 }
 
-void Iso2022Jp::Encoder::transliterate(UnicodeChar, string &buf)
+void Iso2022Jp::Encoder::transliterate(unichar, string &buf)
 {
        if(mode!=ASCII)
                switch_mode(ASCII, buf);
@@ -88,7 +82,7 @@ Iso2022Jp::Decoder::Decoder(ErrorMode em):
        dec(new Ascii::Decoder)
 { }
 
-UnicodeChar Iso2022Jp::Decoder::decode_char(const string &str, string::const_iterator &i)
+unichar Iso2022Jp::Decoder::decode_char(const string &str, string::const_iterator &i)
 {
        if(i==str.end())
                return error("No input");
@@ -97,7 +91,7 @@ UnicodeChar Iso2022Jp::Decoder::decode_char(const string &str, string::const_ite
        {
                string::const_iterator j = i;
 
-               UnicodeChar result = -1;
+               unichar result = -1;
                if(*j==033)
                {
                        unsigned escape = 0;
@@ -156,5 +150,5 @@ void Iso2022Jp::Decoder::switch_mode(Mode m)
        }
 }
 
-} // namespace Codecs
+} // namespace StringCodec
 } // namespace Msp