X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Flatin1.cpp;h=319429f683103d671e73db0f0f34918c5ef32422;hp=fe9e1a4170e1893d86574d2f916c3b7722e5f369;hb=d2118ac101602cfe2d62fb7deb6ef3fcb0fe137b;hpb=dbda1bb7f44f289c9f1c5ba9741970ac264d8e5d diff --git a/source/latin1.cpp b/source/latin1.cpp index fe9e1a4..319429f 100644 --- a/source/latin1.cpp +++ b/source/latin1.cpp @@ -4,11 +4,14 @@ using namespace std; namespace Msp { -void Latin1::Encoder::encode_char(wchar_t c) +void Latin1::Encoder::encode_char(wchar_t c_) { + // Win32 has typedef unsigned short wchar_t + int c=c_; if(c<0 || c>0xFF) - throw CodecError("Can't express character in Latin-1"); - append(c); + error("Can't express character in Latin-1"); + else + append(c); } void Latin1::Decoder::decode_char(const string &str, string::const_iterator &i)