mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-26 00:40:05 +01:00
trunk/branch integration: TextEncoding update
This commit is contained in:
@@ -151,7 +151,7 @@ TextEncoding::~TextEncoding()
|
||||
|
||||
int TextEncoding::convert(const unsigned char* bytes) const
|
||||
{
|
||||
return (int) *bytes;
|
||||
return static_cast<int>(*bytes);
|
||||
}
|
||||
|
||||
|
||||
@@ -161,6 +161,18 @@ int TextEncoding::convert(int ch, unsigned char* bytes, int length) const
|
||||
}
|
||||
|
||||
|
||||
int TextEncoding::queryConvert(const unsigned char* bytes, int length) const
|
||||
{
|
||||
return (int) *bytes;
|
||||
}
|
||||
|
||||
|
||||
int TextEncoding::sequenceLength(const unsigned char* bytes, int length) const
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
TextEncoding& TextEncoding::byName(const std::string& encodingName)
|
||||
{
|
||||
TextEncoding* pEncoding = manager().find(encodingName);
|
||||
@@ -209,9 +221,14 @@ TextEncoding& TextEncoding::global()
|
||||
}
|
||||
|
||||
|
||||
TextEncodingManager& TextEncoding::manager()
|
||||
namespace
|
||||
{
|
||||
static SingletonHolder<TextEncodingManager> sh;
|
||||
}
|
||||
|
||||
|
||||
TextEncodingManager& TextEncoding::manager()
|
||||
{
|
||||
return *sh.get();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user