mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 22:44:49 +00:00
ICU-3594 fix USE_STD3_ASCII_RULES
X-SVN-Rev: 14879
This commit is contained in:
parent
623c46d430
commit
a145d66a17
2 changed files with 9 additions and 11 deletions
|
@ -31,8 +31,8 @@ public class TestIDNA extends TestFmwk {
|
|||
// test StringBuffer toUnicode
|
||||
doTestToUnicode(TestData.asciiIn[i],new String(TestData.unicodeIn[i]),IDNA.DEFAULT, null);
|
||||
doTestToUnicode(TestData.asciiIn[i],new String(TestData.unicodeIn[i]),IDNA.ALLOW_UNASSIGNED, null);
|
||||
//doTestToUnicode(TestData.asciiIn[i],new String(TestData.unicodeIn[i]),IDNA.USE_STD3_RULES, null);
|
||||
//doTestToUnicode(TestData.asciiIn[i],new String(TestData.unicodeIn[i]),IDNA.USE_STD3_RULES|IDNA.ALLOW_UNASSIGNED, null);
|
||||
doTestToUnicode(TestData.asciiIn[i],new String(TestData.unicodeIn[i]),IDNA.USE_STD3_RULES, null);
|
||||
doTestToUnicode(TestData.asciiIn[i],new String(TestData.unicodeIn[i]),IDNA.USE_STD3_RULES|IDNA.ALLOW_UNASSIGNED, null);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -42,8 +42,8 @@ public class TestIDNA extends TestFmwk {
|
|||
// test StringBuffer toUnicode
|
||||
doTestToASCII(new String(TestData.unicodeIn[i]),TestData.asciiIn[i],IDNA.DEFAULT, null);
|
||||
doTestToASCII(new String(TestData.unicodeIn[i]),TestData.asciiIn[i],IDNA.ALLOW_UNASSIGNED, null);
|
||||
//doTestToUnicode(TestData.asciiIn[i],new String(TestData.unicodeIn[i]),IDNA.USE_STD3_RULES, null);
|
||||
//doTestToUnicode(TestData.asciiIn[i],new String(TestData.unicodeIn[i]),IDNA.USE_STD3_RULES|IDNA.ALLOW_UNASSIGNED, null);
|
||||
doTestToUnicode(TestData.asciiIn[i],new String(TestData.unicodeIn[i]),IDNA.USE_STD3_RULES, null);
|
||||
doTestToUnicode(TestData.asciiIn[i],new String(TestData.unicodeIn[i]),IDNA.USE_STD3_RULES|IDNA.ALLOW_UNASSIGNED, null);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -318,11 +318,10 @@ public final class IDNA {
|
|||
char ch=processOut.charAt(j);
|
||||
if(ch > 0x7F){
|
||||
srcIsASCII = false;
|
||||
}
|
||||
// here we do not assemble surrogates
|
||||
// since we know that LDH code points
|
||||
// are in the ASCII range only
|
||||
if(isLDHChar(ch)==false){
|
||||
}else if(isLDHChar(ch)==false){
|
||||
// here we do not assemble surrogates
|
||||
// since we know that LDH code points
|
||||
// are in the ASCII range only
|
||||
srcIsLDH = false;
|
||||
failPos = j;
|
||||
}
|
||||
|
@ -614,8 +613,7 @@ public final class IDNA {
|
|||
while((ch=src.next())!= UCharacterIterator.DONE){
|
||||
if(ch>0x7F){
|
||||
srcIsASCII = false;
|
||||
}
|
||||
if((srcIsLDH = isLDHChar(ch))==false){
|
||||
}else if((srcIsLDH = isLDHChar(ch))==false){
|
||||
failPos = src.getIndex();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue