X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/46f4442e9a5a4f3b98b7c1083586332f6a8a99a4..4d9eefca008a7bc544144ef830fa144ce89deaa0:/icuSources/common/uidna.cpp diff --git a/icuSources/common/uidna.cpp b/icuSources/common/uidna.cpp index b86ed26b..b7780b84 100644 --- a/icuSources/common/uidna.cpp +++ b/icuSources/common/uidna.cpp @@ -1,7 +1,7 @@ /* ******************************************************************************* * - * Copyright (C) 2003-2007, International Business Machines + * Copyright (C) 2003-2009, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -45,8 +45,6 @@ static const UChar ACE_PREFIX[] ={ 0x0078,0x006E,0x002d,0x002d } ; #define CAPITAL_A 0x0041 #define CAPITAL_Z 0x005A -#define DATA_FILE_NAME "uidna" - inline static UChar toASCIILower(UChar ch){ if(CAPITAL_A <= ch && ch <= CAPITAL_Z){ @@ -624,7 +622,7 @@ uidna_toASCII(const UChar* src, int32_t srcLength, return 0; } - UStringPrepProfile* nameprep = usprep_open(NULL,DATA_FILE_NAME, status); + UStringPrepProfile* nameprep = usprep_openByType(USPREP_RFC3491_NAMEPREP, status); if(U_FAILURE(*status)){ return -1; @@ -653,7 +651,7 @@ uidna_toUnicode(const UChar* src, int32_t srcLength, return 0; } - UStringPrepProfile* nameprep = usprep_open(NULL, DATA_FILE_NAME, status); + UStringPrepProfile* nameprep = usprep_openByType(USPREP_RFC3491_NAMEPREP, status); if(U_FAILURE(*status)){ return -1; @@ -684,7 +682,7 @@ uidna_IDNToASCII( const UChar *src, int32_t srcLength, int32_t reqLength = 0; - UStringPrepProfile* nameprep = usprep_open(NULL, DATA_FILE_NAME, status); + UStringPrepProfile* nameprep = usprep_openByType(USPREP_RFC3491_NAMEPREP, status); if(U_FAILURE(*status)){ return 0; @@ -777,7 +775,7 @@ uidna_IDNToUnicode( const UChar* src, int32_t srcLength, int32_t reqLength = 0; - UStringPrepProfile* nameprep = usprep_open(NULL, DATA_FILE_NAME, status); + UStringPrepProfile* nameprep = usprep_openByType(USPREP_RFC3491_NAMEPREP, status); if(U_FAILURE(*status)){ return 0;