Changeset 6226
- Timestamp:
- 05/29/08 02:57:12 (6 months ago)
- Location:
- trunk/licq
- Files:
-
- 2 modified
-
include/licq_translate.h (modified) (2 diffs)
-
src/translate.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/licq/include/licq_translate.h
r6217 r6226 34 34 char* nameForIconv(const char* licqName); 35 35 36 char* ToUnicode(c har* array, const char* fromEncoding = "");37 char* FromUnicode(c har* array, const char* toEncoding = "");36 char* ToUnicode(const char* array, const char* fromEncoding = ""); 37 char* FromUnicode(const char* array, const char* toEncoding = ""); 38 38 39 char* FromUTF16(c har* array, const char* toEncoding, int length = -1);40 char* ToUTF16(c har* array, const char* fromEncoding, size_t& outDone);39 char* FromUTF16(const char* array, const char* toEncoding, int length = -1); 40 char* ToUTF16(const char* array, const char* fromEncoding, size_t& outDone); 41 41 42 42 char* NToRN(const char* array); … … 52 52 unsigned char clientToServerTab[256]; 53 53 54 char* iconvConvert(c har* array, const char* to, const char* from, bool& ok,55 int length = -1, size_t* outDone = NULL);54 char* iconvConvert(const char* array, const char* to, const char* from, 55 bool& ok, int length = -1, size_t* outDone = NULL); 56 56 }; 57 57 -
trunk/licq/src/translate.cpp
r6217 r6226 232 232 } 233 233 234 char* CTranslator::ToUnicode(c har* array, const char* fromEncoding)234 char* CTranslator::ToUnicode(const char* array, const char* fromEncoding) 235 235 { 236 236 if (array == NULL) … … 257 257 } 258 258 259 char* CTranslator::FromUnicode(c har* array, const char* toEncoding)259 char* CTranslator::FromUnicode(const char* array, const char* toEncoding) 260 260 { 261 261 if (array == NULL) … … 277 277 } 278 278 279 char* CTranslator::FromUTF16(c har* array, const char* toEncoding, int length)279 char* CTranslator::FromUTF16(const char* array, const char* toEncoding, int length) 280 280 { 281 281 if (array == NULL) … … 297 297 } 298 298 299 char* CTranslator::ToUTF16(c har* array, const char* fromEncoding, size_t& outDone)299 char* CTranslator::ToUTF16(const char* array, const char* fromEncoding, size_t& outDone) 300 300 { 301 301 if (array == NULL) … … 439 439 } 440 440 441 char* CTranslator::iconvConvert(c har* array, const char* to, const char* from,441 char* CTranslator::iconvConvert(const char* array, const char* to, const char* from, 442 442 bool& ok, int length, size_t* outDone) 443 443 { … … 456 456 char* result = new char[outLen + 1]; 457 457 458 char* inPtr = array; 458 // iconv() has inbuf parameter declared as char** even though the data is 459 // never modified so it's safe to cast away the const here. 460 char* inPtr = const_cast<char*>(array); 459 461 char* outPtr = result; 460 462 iconv_t tr;
