mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-14 23:07:56 +02:00
- [SF 2513643] Seg fault in Poco::UTF8::toLower on 64-bit Linux
- removed support for 5- and 6-byte sequences - fixed error counting in StreamConverterBuf::readFromDevice() - added std::dec to poco_stdout_dbg and poco_stderr_dbg macros
This commit is contained in:
@@ -59,6 +59,16 @@ public:
|
||||
int convert(const unsigned char* bytes) const;
|
||||
int convert(int ch, unsigned char* bytes, int length) const;
|
||||
|
||||
static bool isLegal(const unsigned char *bytes, int length);
|
||||
/// Utility routine to tell whether a sequence of bytes is legal UTF-8.
|
||||
/// This must be called with the length pre-determined by the first byte.
|
||||
/// The sequence is illegal right away if there aren't enough bytes
|
||||
/// available. If presented with a length > 4, this function returns false.
|
||||
/// The Unicode definition of UTF-8 goes up to 4-byte sequences.
|
||||
///
|
||||
/// Adapted from ftp://ftp.unicode.org/Public/PROGRAMS/CVTUTF/ConvertUTF.c
|
||||
/// Copyright 2001-2004 Unicode, Inc.
|
||||
|
||||
private:
|
||||
static const char* _names[];
|
||||
static const CharacterMap _charMap;
|
||||
|
Reference in New Issue
Block a user