mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-20 20:19:32 +00:00
ICU-890 fix unorm_normalize() - preflighting capacity could not be used
X-SVN-Rev: 4172
This commit is contained in:
parent
a3378b9cab
commit
f7da078199
1 changed files with 2 additions and 4 deletions
|
@ -71,15 +71,13 @@ unorm_normalize(const UChar* source,
|
|||
return -1;
|
||||
|
||||
int32_t len = (sourceLength == -1 ? u_strlen(source) : sourceLength);
|
||||
const UnicodeString src((UChar*)source, len, len);
|
||||
const UnicodeString src(sourceLength == -1, source, len);
|
||||
UnicodeString dst(result, 0, resultLength);
|
||||
/* synwee : note quickcheck is added in C ++ normalize method */
|
||||
if ((option & UNORM_IGNORE_HANGUL) != 0)
|
||||
option = Normalizer::IGNORE_HANGUL;
|
||||
Normalizer::normalize(src, normMode, option, dst, *status);
|
||||
int32_t actualLen;
|
||||
T_fillOutputParams(&dst, result, resultLength, &actualLen, status);
|
||||
return actualLen;
|
||||
return uprv_fillOutputString(dst, result, resultLength, status);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue