mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-10 07:39:16 +00:00
ICU-7848 normalize-append will never modify first-suffix if second begins with a has-boundary-before character; leave safeMiddle empty in that case
X-SVN-Rev: 30020
This commit is contained in:
parent
7aaca9b950
commit
af43054b4e
1 changed files with 2 additions and 6 deletions
|
@ -1281,9 +1281,7 @@ void Normalizer2Impl::composeAndAppend(const UChar *src, const UChar *limit,
|
|||
UErrorCode &errorCode) const {
|
||||
if(!buffer.isEmpty()) {
|
||||
const UChar *firstStarterInSrc=findNextCompBoundary(src, limit);
|
||||
if(src==firstStarterInSrc) {
|
||||
buffer.copyReorderableSuffixTo(safeMiddle);
|
||||
} else {
|
||||
if(src!=firstStarterInSrc) {
|
||||
const UChar *lastStarterInDest=findPreviousCompBoundary(buffer.getStart(),
|
||||
buffer.getLimit());
|
||||
int32_t destSuffixLength=(int32_t)(buffer.getLimit()-lastStarterInDest);
|
||||
|
@ -1667,9 +1665,7 @@ void Normalizer2Impl::makeFCDAndAppend(const UChar *src, const UChar *limit,
|
|||
UErrorCode &errorCode) const {
|
||||
if(!buffer.isEmpty()) {
|
||||
const UChar *firstBoundaryInSrc=findNextFCDBoundary(src, limit);
|
||||
if(src==firstBoundaryInSrc) {
|
||||
buffer.copyReorderableSuffixTo(safeMiddle);
|
||||
} else {
|
||||
if(src!=firstBoundaryInSrc) {
|
||||
const UChar *lastBoundaryInDest=findPreviousFCDBoundary(buffer.getStart(),
|
||||
buffer.getLimit());
|
||||
int32_t destSuffixLength=(int32_t)(buffer.getLimit()-lastBoundaryInDest);
|
||||
|
|
Loading…
Add table
Reference in a new issue