Update Csocket to 7c9c6ef676818457a952c2bda478ce7e27a928bf

* Add encoding mode which reads UTF-8 and something else, but sends UTF-8
* Expose encoding conversion error callbacks to subclasses
This commit is contained in:
Alexey Sokolov
2014-12-21 17:07:29 +00:00
parent 4f48bff6a4
commit 86e5ca3fd3
2 changed files with 88 additions and 3 deletions
+15
View File
@@ -1134,6 +1134,19 @@ public:
#ifdef HAVE_ICU
void SetEncoding( const CString& sEncoding );
virtual void IcuExtToUCallback(
UConverterToUnicodeArgs* toArgs,
const char* codeUnits,
int32_t length,
UConverterCallbackReason reason,
UErrorCode* err );
virtual void IcuExtFromUCallback(
UConverterFromUnicodeArgs* fromArgs,
const UChar* codeUnits,
int32_t length,
UChar32 codePoint,
UConverterCallbackReason reason,
UErrorCode* err );
#endif /* HAVE_ICU */
private:
@@ -1200,6 +1213,8 @@ private:
#ifdef HAVE_ICU
icu::LocalUConverterPointer m_cnvInt, m_cnvIntStrict, m_cnvExt;
bool m_cnvTryUTF8;
bool m_cnvSendUTF8;
CS_STRING m_sEncoding;
#endif
};