]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/common/wintz.c
ICU-531.30.tar.gz
[apple/icu.git] / icuSources / common / wintz.c
index 9148b11e61ba1adca74b0f1a653d312aafdc7872..404e7482f8374257048b7b32e9517ce3c41a22d7 100644 (file)
@@ -1,6 +1,6 @@
 /*
 ********************************************************************************
-*   Copyright (C) 2005-2012, International Business Machines
+*   Copyright (C) 2005-2013, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 ********************************************************************************
 *
@@ -17,7 +17,6 @@
 #include "cmemory.h"
 #include "cstring.h"
 
-#include "unicode/ustring.h"
 #include "unicode/ures.h"
 
 #   define WIN32_LEAN_AND_MEAN
@@ -253,11 +252,9 @@ uprv_detectWindowsTimeZone() {
     UErrorCode status = U_ZERO_ERROR;
     UResourceBundle* bundle = NULL;
     char* icuid = NULL;
-    UChar apiStd[MAX_LENGTH_ID];
     char apiStdName[MAX_LENGTH_ID];
     char regStdName[MAX_LENGTH_ID];
     char tmpid[MAX_LENGTH_ID];
-    int32_t apiStdLength = 0;
     int32_t len;
     int id;
     int errorCode;
@@ -283,8 +280,7 @@ uprv_detectWindowsTimeZone() {
 
     /* Convert the wchar_t* standard name to char* */
     uprv_memset(apiStdName, 0, sizeof(apiStdName));
-    u_strFromWCS(apiStd, MAX_LENGTH_ID, &apiStdLength, apiTZI.StandardName, -1, &status);
-    u_austrncpy(apiStdName, apiStd, apiStdLength);
+    wcstombs(apiStdName, apiTZI.StandardName, MAX_LENGTH_ID);
 
     tmpid[0] = 0;