3 This file is part of libmspstrings
4 Copyright © 2006-2007 Mikko Rasa
5 Distributed under the LGPL
8 #ifndef MSP_STRINGS_WINDOWS1252_H_
9 #define MSP_STRINGS_WINDOWS1252_H_
15 class Windows1252: public StringCodec
18 class Encoder: public StringCodec::Encoder
21 Encoder(ErrorMode em=THROW_ON_ERROR): StringCodec::Encoder(em) { }
22 void encode_char(wchar_t);
24 void append_replacement() { append(032); }
27 class Decoder: public StringCodec::Decoder
30 Decoder(ErrorMode em=THROW_ON_ERROR): StringCodec::Decoder(em) { }
31 void decode_char(const std::string &, std::string::const_iterator &);
34 Encoder *create_encoder(ErrorMode em=THROW_ON_ERROR) const { return new Encoder(em); }
35 Decoder *create_decoder(ErrorMode em=THROW_ON_ERROR) const { return new Decoder(em); }