ICU-2323 fix for ID 7 and linient compare of ID names ignoring _,- etc
X-SVN-Rev: 9988
This commit is contained in:
parent
3dcfc893c6
commit
f8b05c5c2d
@ -313,4 +313,12 @@ public class TestUScript extends TestFmwk{
|
||||
oldAbbrId = newAbbrId;
|
||||
}
|
||||
}
|
||||
public void TestScriptNames(){
|
||||
for(int i=0; i<UScript.CODE_LIMIT;i++){
|
||||
String name = UScript.getName(i);
|
||||
if(name.equals("") ){
|
||||
errln("FAILED: getName for code : "+i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -95,6 +95,7 @@ public final class UScript {
|
||||
new NameCodePair( "CANADIAN_ABORIGINAL", UCAS ),
|
||||
new NameCodePair( "CHEROKEE", CHEROKEE ),
|
||||
new NameCodePair( "COMMON", COMMON ),
|
||||
new NameCodePair( "COPTIC", COPTIC ),
|
||||
new NameCodePair( "CYRILLIC", CYRILLIC ),
|
||||
new NameCodePair( "DESERET", DESERET ),
|
||||
new NameCodePair( "DEVANAGARI", DEVANAGARI ),
|
||||
@ -378,7 +379,8 @@ public final class UScript {
|
||||
char[] name2 = s2.toCharArray();
|
||||
int i=0;
|
||||
int j=0;
|
||||
|
||||
int endIndex1 = name1.length-1;
|
||||
int endIndex2 = name2.length-1;
|
||||
for(;;) {
|
||||
if((i>=name1.length)||(j>=name2.length)) {
|
||||
return (name1.length - name2.length);
|
||||
@ -401,7 +403,9 @@ public final class UScript {
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
|
||||
if(i==endIndex1 && j==endIndex2){
|
||||
return 0;
|
||||
}
|
||||
++i;
|
||||
++j;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user