Changeset 2213 for trunk/src/kernel32/unicode.cpp
- Timestamp:
- Dec 27, 1999, 7:42:49 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/unicode.cpp
r1986 r2213 1 /* $Id: unicode.cpp,v 1. 19 1999-12-05 21:11:40sandervl Exp $ */1 /* $Id: unicode.cpp,v 1.20 1999-12-27 18:42:25 sandervl Exp $ */ 2 2 3 3 /* … … 17 17 #include <string.h> 18 18 #include "misc.h" 19 #include "codepage.h" 19 20 #include <unicode.h> 20 21 21 static UconvObject uconv_object = NULL; 22 /*static UconvObject uconv_object = NULL;*/ 23 /* 22 24 BOOL getUconvObject( void ) 23 25 { … … 40 42 return ret; 41 43 } 42 44 */ 43 45 /*********************************************************************** 44 46 * MultiByteToWideChar (KERNEL32.534) … … 200 202 return(TRUE); 201 203 } 204 202 205 //****************************************************************************** 203 206 // unilen: length of astring buffer (including 0 terminator) 204 207 // returns string length 205 208 //****************************************************************************** 206 int WIN32API UnicodeToAsciiN(LPCWSTR ustring, char *astring, int unilen)209 int UnicodeToCodepageN(LPCWSTR ustring, char *astring, int unilen, UconvObject uconv_object) 207 210 { 208 211 int i; … … 227 230 // unilen = min(length, unilen); 228 231 229 if ( getUconvObject())232 if (uconv_object) 230 233 { 231 234 if (unilen == 1) … … 264 267 } 265 268 } 269 270 int WIN32API UnicodeToAsciiN(LPCWSTR ustring, char *astring, int unilen) 271 { 272 return UnicodeToCodepageN(ustring, astring, unilen, GetWindowsUconvObject()); 273 } 274 266 275 //****************************************************************************** 267 276 // Converts unicode string to ascii string … … 327 336 // asciilen: max length of unicode buffer (including end 0) 328 337 //****************************************************************************** 329 void WIN32API AsciiToUnicodeN(const char *ascii, WCHAR *unicode, int asciilen)338 void CodepageToUnicodeN(const char *ascii, WCHAR *unicode, int asciilen, UconvObject uconv_object) 330 339 { 331 340 int rc; … … 352 361 353 362 // dprintf(("KERNEL32: AsciiToUnicodeN %s\n", ascii)); 354 if ( getUconvObject())363 if (uconv_object) 355 364 { 356 365 if (asciilen == 1) … … 389 398 } 390 399 } 400 401 void WIN32API AsciiToUnicodeN(const char *ascii, WCHAR *unicode, int asciilen) 402 { 403 CodepageToUnicodeN(ascii, unicode, asciilen, GetWindowsUconvObject()); 404 } 405 406 391 407 //****************************************************************************** 392 408 // Copies the full string from ascii to unicode
Note:
See TracChangeset
for help on using the changeset viewer.