mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-29 04:17:55 +01:00
sync to internal repository
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// Latin9Encoding.cpp
|
||||
//
|
||||
// $Id: //poco/1.3/Foundation/src/Latin9Encoding.cpp#1 $
|
||||
// $Id: //poco/Main/Foundation/src/Latin9Encoding.cpp#11 $
|
||||
//
|
||||
// Library: Foundation
|
||||
// Package: Text
|
||||
@@ -87,19 +87,20 @@ int Latin9Encoding::convert(int ch, unsigned char* bytes, int length) const
|
||||
{
|
||||
if (ch >= 0 && ch <= 255)
|
||||
{
|
||||
*bytes = ch;
|
||||
if (bytes && length >= 1)
|
||||
*bytes = ch;
|
||||
return 1;
|
||||
}
|
||||
else switch (ch)
|
||||
{
|
||||
case 0x0152: *bytes = 0xbc; return 1;
|
||||
case 0x0153: *bytes = 0xbd; return 1;
|
||||
case 0x0160: *bytes = 0xa6; return 1;
|
||||
case 0x0161: *bytes = 0xa8; return 1;
|
||||
case 0x017d: *bytes = 0xb4; return 1;
|
||||
case 0x017e: *bytes = 0xb8; return 1;
|
||||
case 0x0178: *bytes = 0xbe; return 1;
|
||||
case 0x20ac: *bytes = 0xa4; return 1;
|
||||
case 0x0152: if (bytes && length >= 1) *bytes = 0xbc; return 1;
|
||||
case 0x0153: if (bytes && length >= 1) *bytes = 0xbd; return 1;
|
||||
case 0x0160: if (bytes && length >= 1) *bytes = 0xa6; return 1;
|
||||
case 0x0161: if (bytes && length >= 1) *bytes = 0xa8; return 1;
|
||||
case 0x017d: if (bytes && length >= 1) *bytes = 0xb4; return 1;
|
||||
case 0x017e: if (bytes && length >= 1) *bytes = 0xb8; return 1;
|
||||
case 0x0178: if (bytes && length >= 1) *bytes = 0xbe; return 1;
|
||||
case 0x20ac: if (bytes && length >= 1) *bytes = 0xa4; return 1;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user