mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-05 21:45:37 +00:00
ICU-0 fixed fractional UCA final value
X-SVN-Rev: 17826
This commit is contained in:
parent
34e82fe489
commit
8363c6a821
2 changed files with 23 additions and 6 deletions
|
@ -5,8 +5,8 @@
|
|||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/text/UCA/WriteCollationData.java,v $
|
||||
* $Date: 2005/05/02 15:39:54 $
|
||||
* $Revision: 1.41 $
|
||||
* $Date: 2005/06/08 01:44:48 $
|
||||
* $Revision: 1.42 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -3171,7 +3171,7 @@ F900..FAFF; CJK Compatibility Ideographs
|
|||
}
|
||||
|
||||
int firstImplicit = getImplicitPrimary(CJK_BASE);
|
||||
int lastImplicit = getImplicitPrimary(0x10FFFF);
|
||||
int lastImplicit = getImplicitPrimary(0x10FFFD);
|
||||
|
||||
log.println();
|
||||
log.println("# VALUES BASED ON UCA");
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/unicodetools/com/ibm/text/UCD/QuickTest.java,v $
|
||||
* $Date: 2004/02/07 01:01:14 $
|
||||
* $Revision: 1.3 $
|
||||
* $Date: 2005/06/08 01:44:48 $
|
||||
* $Revision: 1.4 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -21,7 +21,24 @@ import com.ibm.icu.text.UnicodeSet;
|
|||
import com.ibm.text.utility.*;
|
||||
|
||||
public class QuickTest implements UCD_Types {
|
||||
static final void test() {
|
||||
static final void test() {
|
||||
String testString = "en-Arab-200-gaulish-a-abcd-def-x-abcd1234-12345678";
|
||||
for (int i = testString.length() + 1; i > 0; --i) {
|
||||
String trunc = truncateValidLanguageTag(testString, i);
|
||||
System.out.println(i + "\t" + trunc + "\t" + trunc.length());
|
||||
}
|
||||
}
|
||||
|
||||
static String truncateValidLanguageTag(String tag, int limit) {
|
||||
if (tag.length() <= limit) return tag;
|
||||
// legit truncation point has - after, and two letters before
|
||||
do {
|
||||
if (tag.charAt(limit) == '-' && tag.charAt(limit-1) != '-' && tag.charAt(limit-2) != '-') break;
|
||||
} while (--limit > 2);
|
||||
return tag.substring(0,limit);
|
||||
}
|
||||
|
||||
static final void test2() {
|
||||
|
||||
UnicodeSet format = new UnicodeSet("[:Cf:]");
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue