Lines Matching refs:dest
51 void MultiByteToUnicodeString2(UString &dest, const AString &src, UINT codePage)
53 dest.Empty();
58 wchar_t *d = dest.GetBuf(src.Len());
81 dest.ReleaseBuf_SetLen(i);
91 len = (unsigned)MultiByteToWideChar(codePage, 0, src, (int)src.Len(), dest.GetBuf(len), (int)len);
94 dest.ReleaseBuf_SetEnd(len);
117 static void UnicodeStringToMultiByte2(AString &dest, const UString &src, UINT codePage, char defaultChar, bool &defaultCharWasUsed)
119 dest.Empty();
126 char *d = dest.GetBuf(numRequiredBytes);
155 dest.ReleaseBuf_SetLen(i);
172 char *d = dest.GetBuf(src.Len());
181 dest.ReleaseBuf_SetLen(i);
199 dest.GetBuf(len), (int)len,
207 dest.ReleaseBuf_SetEnd(len);
216 AString dest;
218 CharToOem(src, dest.GetBuf(len));
219 dest.ReleaseBuf_CalcLen(len);
220 return dest;
242 static void MultiByteToUnicodeString2_Native(UString &dest, const AString &src)
244 dest.Empty();
249 wchar_t *d = dest.GetBuf((unsigned)limit);
253 dest.ReleaseBuf_SetEnd((unsigned)len);
256 dest.ReleaseBuf_SetEnd(0);
262 void MultiByteToUnicodeString2(UString &dest, const AString &src, UINT codePage)
264 dest.Empty();
270 ConvertUTF8ToUnicode(src, dest);
275 wchar_t *d = dest.GetBuf((unsigned)limit);
279 dest.ReleaseBuf_SetEnd((unsigned)len);
282 d = dest.GetBuf();
285 // wchar_t c = dest[i];
294 dest.ReplaceOneCharAtPos(i, c0);
297 dest.Insert_wchar_t(i, c);
318 dest.ReleaseBuf_SetEnd((unsigned)i);
330 printf("\n-> (%d) %ls\n", (int)dest.Len(), dest.Ptr());
332 for (unsigned i = 0; i < dest.Len(); i++)
334 printf (" %02x", (int)dest[i]);
369 dest.ReleaseBuf_SetLen(i);
373 static void UnicodeStringToMultiByte2_Native(AString &dest, const UString &src)
375 dest.Empty();
380 char *d = dest.GetBuf((unsigned)limit);
386 dest.ReleaseBuf_SetEnd((unsigned)len);
389 dest.ReleaseBuf_SetEnd(0);
393 static void UnicodeStringToMultiByte2(AString &dest, const UString &src2, UINT codePage, char defaultChar, bool &defaultCharWasUsed)
399 ConvertUnicodeToUTF8(src2, dest);
427 dest.Empty();
439 char *d = dest.GetBuf(limit);
456 printf("\nOK : destLen = %d : %s\n", (int)len, dest.Ptr());
458 printf(" %02x", (int)(Byte)dest[i]);
461 dest.ReleaseBuf_SetEnd((unsigned)len2);
469 char *d = dest.GetBuf(src.Len());
489 dest.ReleaseBuf_SetLen(i);
492 printf("ERROR: %s\n", dest.Ptr());
502 UString dest;
503 MultiByteToUnicodeString2(dest, src, codePage);
504 return dest;
513 void UnicodeStringToMultiByte2(AString &dest, const UString &src, UINT codePage)
516 UnicodeStringToMultiByte2(dest, src, codePage, k_DefultChar, defaultCharWasUsed);
521 AString dest;
522 UnicodeStringToMultiByte2(dest, src, codePage, defaultChar, defaultCharWasUsed);
523 return dest;
528 AString dest;
530 UnicodeStringToMultiByte2(dest, src, codePage, k_DefultChar, defaultCharWasUsed);
531 return dest;
543 // void MultiByteToUnicodeString2_Native(UString &dest, const AString &src);