mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-16 10:17:23 +00:00
ICU-5575 update ICU4J version number to 3.7.1
X-SVN-Rev: 21037
This commit is contained in:
parent
50ed24ede7
commit
9c20ed532c
19 changed files with 297 additions and 178 deletions
|
@ -1,14 +1,14 @@
|
|||
#*
|
||||
#*******************************************************************************
|
||||
#* Copyright (C) 2006, International Business Machines Corporation and *
|
||||
#* Copyright (C) 2006-2007, International Business Machines Corporation and *
|
||||
#* others. All Rights Reserved. *
|
||||
#*******************************************************************************
|
||||
#* This is the properties file for ICU4J builds.
|
||||
#*
|
||||
icu4j.version.string=3.6
|
||||
icu4j.version.number=36
|
||||
icu4j.version.string=3.7.1
|
||||
icu4j.version.number=37
|
||||
current.year=2006
|
||||
icu4j.previous.version.number=34
|
||||
icu4j.previous.version.number=36
|
||||
api.report.out=${api.dir}/icu4j_compare_${icu4j.previous.version.number}_${icu4j.version.number}.html
|
||||
copyright=Copyright (c) 2000-2006, International Business Machines Corporation and others. All Rights Reserved.
|
||||
corp=IBM Corporation
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2006, International Business Machines Corporation and *
|
||||
* Copyright (C) 2006-2007, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*
|
||||
|
@ -174,7 +174,7 @@ class CharsetMBCS extends CharsetICU {
|
|||
int type = staticData.conversionType;
|
||||
|
||||
if( type != UConverterSharedData.UConverterType.MBCS ||
|
||||
staticData.structSize != UConverterSharedData.SIZE_OF_UCONVERTER_SHARED_DATA)
|
||||
staticData.structSize != UConverterStaticData.SIZE_OF_UCONVERTER_STATIC_DATA)
|
||||
{
|
||||
throw new InvalidFormatException();
|
||||
}
|
||||
|
@ -217,31 +217,17 @@ class CharsetMBCS extends CharsetICU {
|
|||
baseNameString = reader.readBaseTableName();
|
||||
if(offset != 0) {
|
||||
//agljport:commment subtract 32 for sizeof(_MBCSHeader) and length of baseNameString and 1 null terminator byte all already read;
|
||||
mbcsTable.extIndexes=reader.readExtIndexes(offset - 32 - baseNameString.length() - 1);
|
||||
mbcsTable.extIndexes=reader.readExtIndexes(offset - (reader.bytesRead - reader.staticDataBytesRead));
|
||||
}
|
||||
}
|
||||
catch(IOException e) {
|
||||
throw new InvalidFormatException();
|
||||
}
|
||||
}
|
||||
/*
|
||||
if(offset != 0) {
|
||||
try {
|
||||
//agljport:commment subtract 32 for sizeof(_MBCSHeader) and length of baseNameString and 1 null terminator byte all already read;
|
||||
int namelen = baseNameString != null? baseNameString.length() + 1: 0;
|
||||
mbcsTable.extIndexes=dataReader.readExtIndexes(offset - 32 - namelen);
|
||||
|
||||
}
|
||||
catch(IOException e) {
|
||||
if(debug) System.err.println("Caught IOException: " + e.getMessage());
|
||||
pErrorCode[0] = UErrorCode.U_INVALID_FORMAT_ERROR;
|
||||
return;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//agljport:add this would be unnecessary if extIndexes were memory mapped
|
||||
if(mbcsTable.extIndexes != null) {
|
||||
/*
|
||||
/*if(mbcsTable.extIndexes != null) {
|
||||
|
||||
try {
|
||||
//int nbytes = mbcsTable.extIndexes[UConverterExt.UCNV_EXT_TO_U_LENGTH]*4 + mbcsTable.extIndexes[UConverterExt.UCNV_EXT_TO_U_UCHARS_LENGTH]*2 + mbcsTable.extIndexes[UConverterExt.UCNV_EXT_FROM_U_LENGTH]*6 + mbcsTable.extIndexes[UConverterExt.UCNV_EXT_FROM_U_BYTES_LENGTH] + mbcsTable.extIndexes[UConverterExt.UCNV_EXT_FROM_U_STAGE_12_LENGTH]*2 + mbcsTable.extIndexes[UConverterExt.UCNV_EXT_FROM_U_STAGE_3_LENGTH]*2 + mbcsTable.extIndexes[UConverterExt.UCNV_EXT_FROM_U_STAGE_3B_LENGTH]*4;
|
||||
//int nbytes = mbcsTable.extIndexes[UConverterExt.UCNV_EXT_SIZE]
|
||||
|
@ -253,9 +239,9 @@ class CharsetMBCS extends CharsetICU {
|
|||
pErrorCode[0] = UErrorCode.U_INVALID_FORMAT_ERROR;
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
if(mbcsTable.outputType==MBCS_OUTPUT_EXT_ONLY) {
|
||||
UConverterSharedData baseSharedData = null;
|
||||
ByteBuffer extIndexes;
|
||||
|
@ -436,8 +422,7 @@ class CharsetMBCS extends CharsetICU {
|
|||
try {
|
||||
//agljport:commment subtract 32 for sizeof(_MBCSHeader) and length of baseNameString and 1 null terminator byte all already read;
|
||||
//int namelen = baseNameString != null? baseNameString.length() + 1: 0;
|
||||
//mbcsTable.extIndexes=dataReader.readExtIndexes(offset - 32 - namelen);
|
||||
mbcsTable.extIndexes=reader.readExtIndexes(0);
|
||||
mbcsTable.extIndexes=reader.readExtIndexes(offset-(reader.bytesRead - reader.staticDataBytesRead));
|
||||
}
|
||||
catch(IOException e) {
|
||||
throw new InvalidFormatException();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2006, International Business Machines Corporation and *
|
||||
* Copyright (C) 2006-2007, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*
|
||||
|
@ -409,7 +409,10 @@ final class UConverterDataReader implements ICUBinary.Authenticate {
|
|||
unicodeVersion = r.unicodeVersion;
|
||||
}
|
||||
*/
|
||||
|
||||
/* the number bytes read from the stream */
|
||||
int bytesRead = 0;
|
||||
/* the number of bytes read for static data */
|
||||
int staticDataBytesRead = 0;
|
||||
/**
|
||||
* <p>Protected constructor.</p>
|
||||
* @param inputStream ICU uprop.dat file input stream
|
||||
|
@ -433,73 +436,128 @@ final class UConverterDataReader implements ICUBinary.Authenticate {
|
|||
|
||||
protected void readStaticData(UConverterStaticData sd) throws IOException
|
||||
{
|
||||
int bRead = 0;
|
||||
sd.structSize = dataInputStream.readInt();
|
||||
bRead +=4;
|
||||
byte[] name = new byte[UConverterConstants.MAX_CONVERTER_NAME_LENGTH];
|
||||
int length = dataInputStream.read(name);
|
||||
sd.name = new String(name, 0, length);
|
||||
int len = dataInputStream.read(name);
|
||||
if(len==-1){
|
||||
throw new IOException("Read failed");
|
||||
}
|
||||
bRead +=len;
|
||||
sd.name = new String(name, 0, len);
|
||||
sd.codepage = dataInputStream.readInt();
|
||||
bRead +=4;
|
||||
sd.platform = dataInputStream.readByte();
|
||||
bRead++;
|
||||
sd.conversionType = dataInputStream.readByte();
|
||||
bRead++;
|
||||
sd.minBytesPerChar = dataInputStream.readByte();
|
||||
bRead++;
|
||||
sd.maxBytesPerChar = dataInputStream.readByte();
|
||||
dataInputStream.read(sd.subChar);
|
||||
bRead++;
|
||||
len=dataInputStream.read(sd.subChar);
|
||||
if(len==-1){
|
||||
throw new IOException("Read failed");
|
||||
}
|
||||
bRead += len;
|
||||
sd.subCharLen = dataInputStream.readByte();
|
||||
bRead++;
|
||||
sd.hasToUnicodeFallback = dataInputStream.readByte();
|
||||
bRead++;
|
||||
sd.hasFromUnicodeFallback = dataInputStream.readByte();
|
||||
bRead++;
|
||||
sd.unicodeMask = (short)dataInputStream.readUnsignedByte();
|
||||
bRead++;
|
||||
sd.subChar1 = dataInputStream.readByte();
|
||||
dataInputStream.read(sd.reserved);
|
||||
bRead++;
|
||||
len = dataInputStream.read(sd.reserved);
|
||||
if(len==-1){
|
||||
throw new IOException("Read failed");
|
||||
}
|
||||
bRead += len;
|
||||
staticDataBytesRead = bRead;
|
||||
bytesRead += bRead;
|
||||
}
|
||||
|
||||
protected void readMBCSHeader(CharsetMBCS.MBCSHeader h) throws IOException
|
||||
{
|
||||
dataInputStream.read(h.version);
|
||||
int len =dataInputStream.read(h.version);
|
||||
if(len==-1){
|
||||
throw new IOException("Read failed");
|
||||
}
|
||||
bytesRead += len;
|
||||
h.countStates = dataInputStream.readInt();
|
||||
bytesRead+=4;
|
||||
h.countToUFallbacks = dataInputStream.readInt();
|
||||
bytesRead+=4;
|
||||
h.offsetToUCodeUnits = dataInputStream.readInt();
|
||||
bytesRead+=4;
|
||||
h.offsetFromUTable = dataInputStream.readInt();
|
||||
bytesRead+=4;
|
||||
h.offsetFromUBytes = dataInputStream.readInt();
|
||||
bytesRead+=4;
|
||||
h.flags = dataInputStream.readInt();
|
||||
bytesRead+=4;
|
||||
h.fromUBytesLength = dataInputStream.readInt();
|
||||
bytesRead+=4;
|
||||
}
|
||||
|
||||
protected void readMBCSTable(int[][] stateTableArray, CharsetMBCS.MBCSToUFallback[] toUFallbacksArray, char[] unicodeCodeUnitsArray, char[] fromUnicodeTableArray, byte[] fromUnicodeBytesArray) throws IOException
|
||||
{
|
||||
int i, j;
|
||||
for(i = 0; i < stateTableArray.length; ++i)
|
||||
for(j = 0; j < stateTableArray[i].length; ++j)
|
||||
for(i = 0; i < stateTableArray.length; ++i){
|
||||
for(j = 0; j < stateTableArray[i].length; ++j){
|
||||
stateTableArray[i][j] = dataInputStream.readInt();
|
||||
bytesRead+=4;
|
||||
}
|
||||
}
|
||||
for(i = 0; i < toUFallbacksArray.length; ++i) {
|
||||
toUFallbacksArray[i].offset = dataInputStream.readInt();
|
||||
bytesRead+=4;
|
||||
toUFallbacksArray[i].codePoint = dataInputStream.readInt();
|
||||
bytesRead+=4;
|
||||
}
|
||||
for(i = 0; i < unicodeCodeUnitsArray.length; ++i)
|
||||
for(i = 0; i < unicodeCodeUnitsArray.length; ++i){
|
||||
unicodeCodeUnitsArray[i] = dataInputStream.readChar();
|
||||
for(i = 0; i < fromUnicodeTableArray.length; ++i)
|
||||
bytesRead+=2;
|
||||
}
|
||||
for(i = 0; i < fromUnicodeTableArray.length; ++i){
|
||||
fromUnicodeTableArray[i] = dataInputStream.readChar();
|
||||
for(i = 0; i < fromUnicodeBytesArray.length; ++i)
|
||||
bytesRead+=2;
|
||||
}
|
||||
for(i = 0; i < fromUnicodeBytesArray.length; ++i){
|
||||
fromUnicodeBytesArray[i] = dataInputStream.readByte();
|
||||
bytesRead++;
|
||||
}
|
||||
}
|
||||
|
||||
protected String readBaseTableName() throws IOException
|
||||
{
|
||||
char c;
|
||||
StringBuffer name = new StringBuffer();
|
||||
while((c = (char)dataInputStream.readByte()) != 0)
|
||||
while((c = (char)dataInputStream.readByte()) != 0){
|
||||
name.append(c);
|
||||
bytesRead++;
|
||||
}
|
||||
bytesRead++/*for null terminator*/;
|
||||
return name.toString();
|
||||
}
|
||||
|
||||
//protected int[] readExtIndexes(int skip) throws IOException
|
||||
protected ByteBuffer readExtIndexes(int skip) throws IOException
|
||||
{
|
||||
dataInputStream.skipBytes(skip);
|
||||
|
||||
int skipped = dataInputStream.skipBytes(skip);
|
||||
if(skipped != skip){
|
||||
throw new IOException("could not skip "+ skip +" bytes");
|
||||
}
|
||||
int n = dataInputStream.readInt();
|
||||
bytesRead+=4;
|
||||
int[] indexes = new int[n];
|
||||
indexes[0] = n;
|
||||
for(int i = 1; i < n; ++i) {
|
||||
indexes[i] = dataInputStream.readInt();
|
||||
bytesRead+=4;
|
||||
}
|
||||
//return indexes;
|
||||
|
||||
|
@ -507,14 +565,22 @@ final class UConverterDataReader implements ICUBinary.Authenticate {
|
|||
for(int i = 0; i < n; ++i) {
|
||||
b.putInt(indexes[i]);
|
||||
}
|
||||
dataInputStream.read(b.array(), b.position(), b.remaining());
|
||||
int len = dataInputStream.read(b.array(), b.position(), b.remaining());
|
||||
if(len==-1){
|
||||
throw new IOException("Read failed");
|
||||
}
|
||||
bytesRead += len;
|
||||
return b;
|
||||
}
|
||||
|
||||
protected byte[] readExtTables(int n) throws IOException
|
||||
{
|
||||
byte[] tables = new byte[n];
|
||||
dataInputStream.read(tables);
|
||||
int len =dataInputStream.read(tables);
|
||||
if(len==-1){
|
||||
throw new IOException("Read failed");
|
||||
}
|
||||
bytesRead += len;
|
||||
return tables;
|
||||
}
|
||||
|
||||
|
@ -536,7 +602,7 @@ final class UConverterDataReader implements ICUBinary.Authenticate {
|
|||
/**
|
||||
* ICU data file input stream
|
||||
*/
|
||||
private DataInputStream dataInputStream;
|
||||
DataInputStream dataInputStream;
|
||||
|
||||
// private byte[] unicodeVersion;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2006, International Business Machines Corporation and *
|
||||
* Copyright (C) 2006-2007, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*
|
||||
|
@ -415,7 +415,7 @@ final class UConverterSharedData {
|
|||
//static final int MAC_HEBREW = MAC_ARABIC + 1; //34 Not in ICU4C
|
||||
|
||||
// Number of converter types for which we have conversion routines.
|
||||
//static final int NUMBER_OF_SUPPORTED_CONVERTER_TYPES = MAC_HEBREW + 1;
|
||||
static final int NUMBER_OF_SUPPORTED_CONVERTER_TYPES = IMAP_MAILBOX + 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -440,7 +440,7 @@ final class UConverterSharedData {
|
|||
|
||||
static final String DATA_TYPE = "cnv";
|
||||
//static final int CNV_DATA_BUFFER_SIZE = 25000;
|
||||
static final int SIZE_OF_UCONVERTER_SHARED_DATA = 100;
|
||||
static final int SIZE_OF_UCONVERTER_SHARED_DATA = 228;
|
||||
|
||||
static final int MAXIMUM_UCS2 = 0x0000FFFF;
|
||||
static final int MAXIMUM_UTF = 0x0010FFFF;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2006, International Business Machines Corporation and *
|
||||
* Copyright (C) 2006-2007, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*
|
||||
|
@ -56,6 +56,6 @@ final class UConverterStaticData { /* +offset: size */
|
|||
System.arraycopy(reserved_, 0, reserved, 0, (reserved.length < reserved_.length? reserved.length : reserved_.length));
|
||||
}*/
|
||||
|
||||
public static final int sizeofUConverterStaticData = 100;
|
||||
public static final int SIZE_OF_UCONVERTER_STATIC_DATA = 100;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8852134514b37f1fb25c7477e93979d6a78ebeccc47b3eb127f0c0a4e7f17a1c
|
||||
size 691464
|
||||
oid sha256:1016b5a2c8fa74cb00f2f479aa46029d7ea4519d7ad48c74df54cb4b8f56130a
|
||||
size 784319
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2003-2006, International Business Machines Corporation and *
|
||||
* Copyright (C) 2003-2007, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -14,16 +14,14 @@ import com.ibm.icu.util.VersionInfo;
|
|||
public abstract class AbstractTestLog implements TestLog {
|
||||
|
||||
public static boolean dontSkipForVersion = false;
|
||||
public boolean skipIfBeforeICU(int major, int minor) {
|
||||
if (dontSkipForVersion || VersionInfo.ICU_VERSION.compareTo(VersionInfo.getInstance(major, minor)) > 0) {
|
||||
public boolean skipIfBeforeICU(int major, int minor, int micro) {
|
||||
if (dontSkipForVersion || VersionInfo.ICU_VERSION.compareTo(VersionInfo.getInstance(major, minor, micro)) > 0) {
|
||||
return false;
|
||||
}
|
||||
logln("Test skipped before ICU release " + major + "." + minor);
|
||||
return true;
|
||||
}
|
||||
public boolean isICUVersionAtLeast(int major, int minor){
|
||||
return (VersionInfo.ICU_VERSION.compareTo(VersionInfo.getInstance(major, minor)) >= 0);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a message.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2002-2006, International Business Machines Corporation and *
|
||||
* Copyright (C) 2002-2007, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*
|
||||
|
@ -135,7 +135,7 @@ public class TestConversion extends ModuleTest {
|
|||
}
|
||||
|
||||
// ----for debugging only
|
||||
logln("\nTestFromUnicode[" + caseNr + "] " + cc.charset + " ");
|
||||
logln("TestFromUnicode[" + caseNr + "] " + cc.charset + " ");
|
||||
logln("Unicode: " + cc.unicode);
|
||||
logln("Bytes:");
|
||||
printbytes(cc.bytes, cc.bytes.limit());
|
||||
|
@ -400,13 +400,13 @@ public class TestConversion extends ModuleTest {
|
|||
}
|
||||
logln("fromUnicode[" + cc.caseNr + "](" + cc.charset
|
||||
+ ") callback:" + cc.cbopt + " failed: +"
|
||||
+ "wrong result length" + "\n");
|
||||
+ "wrong result length" + "");
|
||||
return false;
|
||||
}
|
||||
if (!checkResultsFromUnicode(cc, cc.bytes, cc.fromUnicodeResult)) {
|
||||
logln("fromUnicode[" + cc.caseNr + "](" + cc.charset
|
||||
+ ") callback:" + cc.cbopt + " failed: +"
|
||||
+ "wrong result string" + "\n");
|
||||
+ "wrong result string" + "");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -448,7 +448,7 @@ public class TestConversion extends ModuleTest {
|
|||
}
|
||||
|
||||
// ----for debugging only
|
||||
logln("\nTestToUnicode[" + caseNr + "] " + cc.charset + " ");
|
||||
logln("TestToUnicode[" + caseNr + "] " + cc.charset + " ");
|
||||
logln("Bytes:");
|
||||
printbytes(cc.bytes, cc.bytes.limit());
|
||||
logln("");
|
||||
|
@ -456,7 +456,7 @@ public class TestConversion extends ModuleTest {
|
|||
logln("Callback: (" + cc.cbopt + ")");
|
||||
ByteBuffer c = ByteBuffer.wrap(cc.cbopt.getBytes());
|
||||
printbytes(c, c.limit());
|
||||
logln("\n...............................................");
|
||||
logln("...............................................");
|
||||
|
||||
// ----for debugging only
|
||||
|
||||
|
@ -845,13 +845,13 @@ public class TestConversion extends ModuleTest {
|
|||
// check everything that might have gone wrong
|
||||
if (cc.unicode.length() != resultLength) {
|
||||
logln("toUnicode[" + cc.caseNr + "](" + cc.charset + ") callback:"
|
||||
+ cc.cbopt + " failed: +" + "wrong result length" + "\n");
|
||||
+ cc.cbopt + " failed: +" + "wrong result length" + "");
|
||||
checkResultsToUnicode(cc, cc.unicode, cc.toUnicodeResult);
|
||||
return false;
|
||||
}
|
||||
if (!checkResultsToUnicode(cc, cc.unicode, cc.toUnicodeResult)) {
|
||||
logln("toUnicode[" + cc.caseNr + "](" + cc.charset + ") callback:"
|
||||
+ cc.cbopt + " failed: +" + "wrong result string" + "\n");
|
||||
+ cc.cbopt + " failed: +" + "wrong result string" + "");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1014,8 +1014,8 @@ public class TestConversion extends ModuleTest {
|
|||
len = len - target.position();
|
||||
|
||||
if (len != source.remaining()) {
|
||||
errln("Test failed: output does not match expected\n");
|
||||
logln("[" + cc.caseNr + "]:" + cc.charset + "\noutput=");
|
||||
errln("Test failed: output length does not match expected for charset: "+cc.charset+ " [" + cc.caseNr + "]");
|
||||
logln("[" + cc.caseNr + "]:" + cc.charset + "output=");
|
||||
printbytes(target, len);
|
||||
logln("");
|
||||
return false;
|
||||
|
@ -1023,8 +1023,8 @@ public class TestConversion extends ModuleTest {
|
|||
source.rewind();
|
||||
for (int i = 0; i < source.remaining(); i++) {
|
||||
if (target.get() != source.get()) {
|
||||
errln("Test failed: output does not match expected\n");
|
||||
logln("[" + cc.caseNr + "]:" + cc.charset + "\noutput=");
|
||||
errln("Test failed: output does not match expected for charset: "+cc.charset+ " [" + cc.caseNr + "]");
|
||||
logln("[" + cc.caseNr + "]:" + cc.charset + "output=");
|
||||
printbytes(target, len);
|
||||
logln("");
|
||||
return false;
|
||||
|
@ -1033,7 +1033,7 @@ public class TestConversion extends ModuleTest {
|
|||
logln("[" + cc.caseNr + "]:" + cc.charset);
|
||||
log("output=");
|
||||
printbytes(target, len);
|
||||
logln("\nPassed\n");
|
||||
logln("Passed");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -1045,15 +1045,15 @@ public class TestConversion extends ModuleTest {
|
|||
|
||||
// test to see if the conversion matches actual results
|
||||
if (len != source.length()) {
|
||||
errln("Test failed: output does not match expected\n");
|
||||
logln("[" + cc.caseNr + "]:" + cc.charset + "\noutput=");
|
||||
errln("Test failed: output length does not match expected for charset: "+cc.charset+ " [" + cc.caseNr + "]");
|
||||
logln("[" + cc.caseNr + "]:" + cc.charset + "output=");
|
||||
printchar(target, len);
|
||||
return false;
|
||||
}
|
||||
for (int i = 0; i < source.length(); i++) {
|
||||
if (!(hex(target.get(i)).equals(hex(source.charAt(i))))) {
|
||||
errln("Test failed: output does not match expected\n");
|
||||
logln("[" + cc.caseNr + "]:" + cc.charset + "\noutput=");
|
||||
errln("Test failed: output does not match expected for charset: "+cc.charset+ " [" + cc.caseNr + "]");
|
||||
logln("[" + cc.caseNr + "]:" + cc.charset + "output=");
|
||||
printchar(target, len);
|
||||
return false;
|
||||
}
|
||||
|
@ -1061,7 +1061,7 @@ public class TestConversion extends ModuleTest {
|
|||
logln("[" + cc.caseNr + "]:" + cc.charset);
|
||||
log("output=");
|
||||
printchar(target, len);
|
||||
logln("\nPassed\n");
|
||||
logln("Passed");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2002-2006, International Business Machines Corporation and *
|
||||
* Copyright (C) 2002-2007, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -52,7 +52,7 @@ public class RandomCollator extends TestFmwk {
|
|||
// System.out.println("\nTestRandom skipped for 2003");
|
||||
// return;
|
||||
// }
|
||||
if(skipIfBeforeICU(3,6)) return;
|
||||
if(skipIfBeforeICU(3,7,1)) return;
|
||||
//String fileName;
|
||||
PrintWriter pw = BagFormatter.openUTF8Writer(System.getProperty("user.dir")+File.separator, "RandomCollationTestLog.txt");
|
||||
TestCollator tc = new TestCollator(chars);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2006, International Business Machines Corporation and *
|
||||
* Copyright (C) 1996-2007, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -365,6 +365,7 @@ public class TestUScript extends TestFmwk {
|
|||
"Lepc", "Lina", "Mand", "Maya", "Mero", "Nko", "Orkh", "Perm", "Phags_Pa", "Phoenician",
|
||||
"Plrd", "Roro", "Sara", "Syre", "Syrj", "Syrn", "Teng", "Vaii", "Visp", "Cuneiform",
|
||||
"Zxxx", "Unknown",
|
||||
"Cari", "Jpan", "Lana", "Lyci", "Lydi", "Olck", "Rjng", "Saur", "Sgnw", "Sund",
|
||||
};
|
||||
String[] expectedShort = new String[]{
|
||||
"Bali", "Batk", "Blis", "Brah", "Cham", "Cirt", "Cyrs", "Egyd", "Egyh", "Egyp",
|
||||
|
@ -372,6 +373,7 @@ public class TestUScript extends TestFmwk {
|
|||
"Lepc", "Lina", "Mand", "Maya", "Mero", "Nkoo", "Orkh", "Perm", "Phag", "Phnx",
|
||||
"Plrd", "Roro", "Sara", "Syre", "Syrj", "Syrn", "Teng", "Vaii", "Visp", "Xsux",
|
||||
"Zxxx", "Zzzz",
|
||||
"Cari", "Jpan", "Lana", "Lyci", "Lydi", "Olck", "Rjng", "Saur", "Sgnw", "Sund",
|
||||
};
|
||||
int j = 0;
|
||||
int i = 0;
|
||||
|
|
|
@ -62,7 +62,7 @@ public class TestCanonicalIterator extends TestFmwk {
|
|||
|
||||
String s = UTF16.valueOf(i);
|
||||
|
||||
if (! skipIfBeforeICU(3, 4)) {
|
||||
if (! skipIfBeforeICU(3, 4,0)) {
|
||||
characterTest(s, i, it);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//##header
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2002-2006, International Business Machines Corporation and *
|
||||
* Copyright (C) 2002-2007, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -45,7 +45,7 @@ public class TimeZoneAliasTest extends TestFmwk {
|
|||
* 2. all aliases must have the same offsets
|
||||
*/
|
||||
public void TestAliases() {
|
||||
if (skipIfBeforeICU(3,0)) return;
|
||||
if (skipIfBeforeICU(3,0,0)) return;
|
||||
Zone.Seconds seconds = new Zone.Seconds();
|
||||
for (Iterator it = Zone.getZoneSet().iterator(); it.hasNext(); ) {
|
||||
Zone zone = (Zone)it.next();
|
||||
|
@ -86,7 +86,7 @@ public class TimeZoneAliasTest extends TestFmwk {
|
|||
* We check to see that every timezone that is not an alias is actually different!
|
||||
*/
|
||||
public void TestDifferences() {
|
||||
if (skipIfBeforeICU(3,0)) return;
|
||||
if (skipIfBeforeICU(3,0,0)) return;
|
||||
Zone last = null;
|
||||
Zone.Seconds diffDate = new Zone.Seconds();
|
||||
for (Iterator it = Zone.getZoneSet().iterator(); it.hasNext();) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2000-2006, International Business Machines Corporation and *
|
||||
* Copyright (C) 2000-2007, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -206,7 +206,7 @@ public class RoundTripTest extends TestFmwk {
|
|||
|
||||
String getGreekSet() {
|
||||
// Time bomb
|
||||
if (skipIfBeforeICU(3,6)) {
|
||||
if (skipIfBeforeICU(3,7,1)) {
|
||||
// We temporarily filter against Unicode 4.1, but we only do this
|
||||
// before version 3.5.
|
||||
logln("TestGreek needs to be updated to remove delete the section marked [:Age=4.0:] filter");
|
||||
|
@ -268,7 +268,7 @@ public class RoundTripTest extends TestFmwk {
|
|||
|
||||
public void TestHebrew() throws IOException {
|
||||
// Time bomb
|
||||
if (skipIfBeforeICU(3,6)) {
|
||||
if (skipIfBeforeICU(3,7,1)) {
|
||||
// We temporarily filter against Unicode 4.1, but we only do this
|
||||
// before version 3.5.
|
||||
logln("TestHebrew needs to be updated to remove delete the section marked [:Age=4.0:] filter");
|
||||
|
@ -283,18 +283,18 @@ public class RoundTripTest extends TestFmwk {
|
|||
|
||||
public void TestThai() throws IOException {
|
||||
long start = System.currentTimeMillis();
|
||||
if(isICUVersionAtLeast(3,7)){
|
||||
if(skipIfBeforeICU(3,7,1)){
|
||||
new Test("Latin-Thai")
|
||||
.test("[a-zA-Z\u0142\u1ECD\u00E6\u0131\u0268\u02CC]",
|
||||
"[\u0E01-\u0E3A\u0E40-\u0E5B]",
|
||||
"[a-zA-Z\u0142\u1ECD\u00E6\u0131\u0268\u02B9\u02CC]",
|
||||
"[\u0E4F]", this, new LegalThai());
|
||||
}else{
|
||||
new Test("Latin-Thai")
|
||||
.test("[a-zA-Z\u0142\u1ECD\u00E6\u0131\u0268\u02CC]",
|
||||
"[\u0E01-\u0E3A\u0E40-\u0E5B]",
|
||||
"[a-zA-Z\u0142\u1ECD\u00E6\u0131\u0268\u02B9\u02CC]",
|
||||
null, this, new LegalThai());
|
||||
}else{
|
||||
new Test("Latin-Thai")
|
||||
.test("[a-zA-Z\u0142\u1ECD\u00E6\u0131\u0268\u02CC]",
|
||||
"[\u0E01-\u0E3A\u0E40-\u0E5B]",
|
||||
"[a-zA-Z\u0142\u1ECD\u00E6\u0131\u0268\u02B9\u02CC]",
|
||||
"[\u0E4F]", this, new LegalThai());
|
||||
}
|
||||
|
||||
showElapsed(start, "TestThai");
|
||||
|
@ -365,18 +365,18 @@ public class RoundTripTest extends TestFmwk {
|
|||
|
||||
public void TestDevanagariLatin() throws IOException {
|
||||
long start = System.currentTimeMillis();
|
||||
if(skipIfBeforeICU(2,8)){
|
||||
if(skipIfBeforeICU(2,8,0)){
|
||||
new Test("Latin-DEVANAGARI", 50)
|
||||
.test(latinForIndic, "[[:Devanagari:][\u094d][\u0964\u0965] & [:Age=3.2:]]", "[\u0965]", this, new LegalIndic());
|
||||
|
||||
}else{
|
||||
if (isICUVersionAtLeast(3,8)) {
|
||||
// We temporarily filter against Unicode 4.1, but we only do this
|
||||
if (skipIfBeforeICU(3,7,1)) {
|
||||
logln("Warning: TestDevanagariLatin needs to be updated to remove delete the section marked [:Age=4.1:] filter");
|
||||
} else {
|
||||
// We temporarily filter against Unicode 4.1, but we only do this
|
||||
// before version 3.4.
|
||||
errln("FAIL: TestDevanagariLatin needs to be updated to remove delete the [:Age=4.1:] filter ");
|
||||
return;
|
||||
} else {
|
||||
logln("Warning: TestDevanagariLatin needs to be updated to remove delete the section marked [:Age=4.1:] filter");
|
||||
}
|
||||
new Test("Latin-DEVANAGARI", 50)
|
||||
.test(latinForIndic, "[[[:Devanagari:][\u094d][\u0964\u0965]]&[:Age=4.1:]]", "[\u0965\u0904]", this, new LegalIndic());
|
||||
|
@ -744,17 +744,17 @@ public class RoundTripTest extends TestFmwk {
|
|||
logln("Testing only 5 of "+ interIndicArray.length+" Skipping rest (use -e for exhaustive)");
|
||||
num = 5;
|
||||
}
|
||||
if (isICUVersionAtLeast(3,8)) {
|
||||
// We temporarily filter against Unicode 4.1, but we only do this
|
||||
if (skipIfBeforeICU(3,7,1)) {
|
||||
logln("Warning: TestInterIndic needs to be updated to remove delete the section marked [:Age=4.1:] filter");
|
||||
} else {
|
||||
// We temporarily filter against Unicode 4.1, but we only do this
|
||||
// before version 3.4.
|
||||
errln("FAIL: TestInterIndic needs to be updated to remove delete the [:Age=4.1:] filter ");
|
||||
return;
|
||||
} else {
|
||||
logln("Warning: TestInterIndic needs to be updated to remove delete the section marked [:Age=4.1:] filter");
|
||||
}
|
||||
for(int i=0; i<num;i++){
|
||||
logln("Testing " + interIndicArray[i][0] + " at index " + i );
|
||||
if(skipIfBeforeICU(2,8)){
|
||||
if(skipIfBeforeICU(2,8,0)){
|
||||
new Test(interIndicArray[i][0], 50)
|
||||
.test("[" + interIndicArray[i][1]+" & [:Age=3.2:]]",
|
||||
"[" + interIndicArray[i][2]+" & [:Age=3.2:]]",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2006, International Business Machines Corporation and *
|
||||
* Copyright (C) 1996-2007, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -60,10 +60,10 @@ public class UnicodeSetTest extends TestFmwk {
|
|||
// HACK for now
|
||||
|
||||
if (propNum == 4098 && e1 instanceof NullPointerException) {
|
||||
if (skipIfBeforeICU(3,7)) continue;
|
||||
if (skipIfBeforeICU(3,7,1)) continue;
|
||||
}
|
||||
if (propNum == 4112 || propNum == 4113) {
|
||||
if (skipIfBeforeICU(3,7)) continue;
|
||||
if (skipIfBeforeICU(3,7,1)) continue;
|
||||
}
|
||||
|
||||
errln("Can't get property value name for: "
|
||||
|
@ -92,7 +92,7 @@ public class UnicodeSetTest extends TestFmwk {
|
|||
}
|
||||
}
|
||||
if (collectedErrors.size() != 0) {
|
||||
if (propNum == 4107 && valueNum == 0 && skipIfBeforeICU(3,7)) {
|
||||
if (propNum == 4107 && valueNum == 0 && skipIfBeforeICU(3,7,1)) {
|
||||
continue;
|
||||
}
|
||||
errln("Property Value Differs: "
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//##header VERSION_1.5
|
||||
//##header VERSION_1.6
|
||||
/**
|
||||
*******************************************************************************
|
||||
* Copyright (C) 2002-2007, International Business Machines Corporation and *
|
||||
|
@ -19,15 +19,15 @@ import com.sun.javadoc.*;
|
|||
//import com.sun.tools.doclets.*;
|
||||
//#endif
|
||||
//#ifdef VERSION_1.5
|
||||
|
||||
import com.sun.tools.doclets.internal.toolkit.taglets.*;
|
||||
import com.sun.tools.doclets.internal.toolkit.taglets.Taglet;
|
||||
|
||||
// jdk 1.5 contains both com.sun.tools.doclets.Taglet and
|
||||
// com.sun.tools.doclets.internal.toolkit.taglets.Taglet.
|
||||
// Their registration code casts to the second, not the first, and the
|
||||
// second doesn't implement the first, so if you just implement the
|
||||
// first, you die.
|
||||
//##
|
||||
//##import com.sun.tools.doclets.internal.toolkit.taglets.*;
|
||||
//##import com.sun.tools.doclets.internal.toolkit.taglets.Taglet;
|
||||
//##
|
||||
//##// jdk 1.5 contains both com.sun.tools.doclets.Taglet and
|
||||
//##// com.sun.tools.doclets.internal.toolkit.taglets.Taglet.
|
||||
//##// Their registration code casts to the second, not the first, and the
|
||||
//##// second doesn't implement the first, so if you just implement the
|
||||
//##// first, you die.
|
||||
//#endif
|
||||
|
||||
import java.text.BreakIterator;
|
||||
|
@ -54,7 +54,7 @@ public abstract class ICUTaglet implements Taglet {
|
|||
ICUDraftTaglet.register(taglets);
|
||||
ICUStableTaglet.register(taglets);
|
||||
//#ifndef VERSION_1.5
|
||||
//## ICUDeprecatedTaglet.register(taglets);
|
||||
ICUDeprecatedTaglet.register(taglets);
|
||||
//#endif
|
||||
ICUProvisionalTaglet.register(taglets);
|
||||
ICUObsoleteTaglet.register(taglets);
|
||||
|
@ -117,22 +117,22 @@ public abstract class ICUTaglet implements Taglet {
|
|||
return null;
|
||||
}
|
||||
//#ifdef VERSION_1.5
|
||||
|
||||
public TagletOutput getTagletOutput(Tag tag, TagletWriter writer) throws IllegalArgumentException {
|
||||
TagletOutput out = writer.getTagletOutputInstance();
|
||||
out.setOutput(toString(tag));
|
||||
return out;
|
||||
}
|
||||
|
||||
public TagletOutput getTagletOutput(Doc holder, TagletWriter writer) throws IllegalArgumentException {
|
||||
TagletOutput out = writer.getTagletOutputInstance();
|
||||
Tag[] tags = holder.tags(getName());
|
||||
if (tags.length == 0) {
|
||||
return null;
|
||||
}
|
||||
out.setOutput(toString(tags[0]));
|
||||
return out;
|
||||
}
|
||||
//##
|
||||
//## public TagletOutput getTagletOutput(Tag tag, TagletWriter writer) throws IllegalArgumentException {
|
||||
//## TagletOutput out = writer.getTagletOutputInstance();
|
||||
//## out.setOutput(toString(tag));
|
||||
//## return out;
|
||||
//## }
|
||||
//##
|
||||
//## public TagletOutput getTagletOutput(Doc holder, TagletWriter writer) throws IllegalArgumentException {
|
||||
//## TagletOutput out = writer.getTagletOutputInstance();
|
||||
//## Tag[] tags = holder.tags(getName());
|
||||
//## if (tags.length == 0) {
|
||||
//## return null;
|
||||
//## }
|
||||
//## out.setOutput(toString(tags[0]));
|
||||
//## return out;
|
||||
//## }
|
||||
//#endif
|
||||
|
||||
protected static final String STATUS = "<dt><b>Status:</b></dt>";
|
||||
|
@ -194,40 +194,40 @@ public abstract class ICUTaglet implements Taglet {
|
|||
}
|
||||
}
|
||||
//#ifndef VERSION_1.5
|
||||
//##
|
||||
//## /*
|
||||
//## * sigh, in JDK 1.5 we can't override the standard deprecated taglet
|
||||
//## * so easily. I'm not impressed with the javadoc code.
|
||||
//## */
|
||||
//## public static class ICUDeprecatedTaglet extends ICUTaglet {
|
||||
//## private static final String NAME = "deprecated";
|
||||
//##
|
||||
//## public static void register(Map taglets) {
|
||||
//## taglets.remove(NAME); // override standard deprecated taglet
|
||||
//## taglets.put(NAME, new ICUDeprecatedTaglet());
|
||||
//## }
|
||||
//##
|
||||
//## private ICUDeprecatedTaglet() {
|
||||
//## super(NAME, MASK_DEFAULT);
|
||||
//## }
|
||||
//##
|
||||
//## public String toString(Tag tag) {
|
||||
//## BreakIterator bi = BreakIterator.getSentenceInstance(Locale.US);
|
||||
//## String text = tag.text();
|
||||
//## bi.setText(text);
|
||||
//## int first = bi.first();
|
||||
//## int next = bi.next();
|
||||
//## if (first == -1 || next == -1) {
|
||||
//## System.err.println("Warning: bad deprecated tag '" + text + "'");
|
||||
//## return "<dd><em>Note</em>. " + text + "</dd>";
|
||||
//## } else {
|
||||
//## if ("This API is ICU internal only.".equals(text)) {
|
||||
//## return null;
|
||||
//## }
|
||||
//## return "<dd><em>Note, " + text.substring(first, next) + "</em>. " + text.substring(next) + "</dd>";
|
||||
//## }
|
||||
//## }
|
||||
//## }
|
||||
|
||||
/*
|
||||
* sigh, in JDK 1.5 we can't override the standard deprecated taglet
|
||||
* so easily. I'm not impressed with the javadoc code.
|
||||
*/
|
||||
public static class ICUDeprecatedTaglet extends ICUTaglet {
|
||||
private static final String NAME = "deprecated";
|
||||
|
||||
public static void register(Map taglets) {
|
||||
taglets.remove(NAME); // override standard deprecated taglet
|
||||
taglets.put(NAME, new ICUDeprecatedTaglet());
|
||||
}
|
||||
|
||||
private ICUDeprecatedTaglet() {
|
||||
super(NAME, MASK_DEFAULT);
|
||||
}
|
||||
|
||||
public String toString(Tag tag) {
|
||||
BreakIterator bi = BreakIterator.getSentenceInstance(Locale.US);
|
||||
String text = tag.text();
|
||||
bi.setText(text);
|
||||
int first = bi.first();
|
||||
int next = bi.next();
|
||||
if (first == -1 || next == -1) {
|
||||
System.err.println("Warning: bad deprecated tag '" + text + "'");
|
||||
return "<dd><em>Note</em>. " + text + "</dd>";
|
||||
} else {
|
||||
if ("This API is ICU internal only.".equals(text)) {
|
||||
return null;
|
||||
}
|
||||
return "<dd><em>Note, " + text.substring(first, next) + "</em>. " + text.substring(next) + "</dd>";
|
||||
}
|
||||
}
|
||||
}
|
||||
//#endif
|
||||
|
||||
public static class ICUProvisionalTaglet extends ICUTaglet {
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e8187d31c67ec7707e998f229f1c221a8d5632af978cf1722b3a606c740aaf9f
|
||||
size 5083096
|
||||
oid sha256:846f95f3b267c0b233e5f3bb3cfb4efa2f1b9e5e090744b2aa914fd0bb585e64
|
||||
size 5141316
|
||||
|
|
|
@ -625,12 +625,72 @@ public final class UScript {
|
|||
public static final int UNKNOWN = 103;/* Zzzz */ /* Unknown="Code for uncoded script", for unassigned code points */
|
||||
|
||||
/* Private use codes from Qaaa - Qabx are not supported*/
|
||||
|
||||
/**
|
||||
* New script codes from ISO 15924
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public static final int CARIAN = 104;/* Cari */
|
||||
/**
|
||||
* New script codes from ISO 15924
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public static final int JAPANESE = 105;/* Jpan */
|
||||
/**
|
||||
* New script codes from ISO 15924
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public static final int LANNA = 106;/* Lana */
|
||||
/**
|
||||
* New script codes from ISO 15924
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public static final int LYCIAN = 107;/* Lyci */
|
||||
/**
|
||||
* New script codes from ISO 15924
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public static final int LYDIAN = 108;/* Lydi */
|
||||
/**
|
||||
* New script codes from ISO 15924
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public static final int OL_CHIKI = 109;/* Olck */
|
||||
/**
|
||||
* New script codes from ISO 15924
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public static final int REJANG = 110;/* Rjng */
|
||||
/**
|
||||
* New script codes from ISO 15924
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public static final int SAURASHTRA = 111;/* Saur */
|
||||
/**
|
||||
* New script codes from ISO 15924
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public static final int SIGN_WRITING = 112;/* Sgnw */
|
||||
/**
|
||||
* New script codes from ISO 15924
|
||||
* @draft ICU 3.8
|
||||
* @provisional This API might change or be removed in a future release.
|
||||
*/
|
||||
public static final int SUNDANESE = 113;/* Sund */
|
||||
|
||||
/**
|
||||
* Limit
|
||||
* @stable ICU 2.4
|
||||
*/
|
||||
public static final int CODE_LIMIT = 104;
|
||||
public static final int CODE_LIMIT = 114;
|
||||
|
||||
private static final int SCRIPT_MASK = 0x0000007f;
|
||||
private static final UCharacterProperty prop= UCharacterProperty.getInstance();
|
||||
|
|
|
@ -73,12 +73,17 @@ import java.nio.ByteBuffer;
|
|||
* Depending on the organization of your resources, the syntax to getBundleInstance will change.
|
||||
* To open ICU style organization use:
|
||||
* <pre>
|
||||
* UResourceBundle bundle = UResourceBundle.getBundleInstance("com/ibm/icu/impl/data/icudt30b", "en_US");
|
||||
* UResourceBundle bundle = UResourceBundle.getBundleInstance("com/mycompany/resources", "en_US", myClassLoader);
|
||||
* </pre>
|
||||
* To open Java/JDK style organization use:
|
||||
* <pre>
|
||||
* UResourceBundle bundle = UResourceBundle.getBundleInstance("com.ibm.icu.impl.data.LocaleElements", "en_US");
|
||||
* UResourceBundle bundle = UResourceBundle.getBundleInstance("com.mycompany.resources.LocaleElements", "en_US", myClassLoader);
|
||||
* </pre>
|
||||
* <note>
|
||||
* Please use pass a class loader for loading non-ICU resources. Java security does not
|
||||
* allow loading of resources across jar files. You must provide your class loader
|
||||
* to load the resources
|
||||
* </note>
|
||||
* @stable ICU 3.0
|
||||
* @author ram
|
||||
*/
|
||||
|
@ -214,6 +219,9 @@ public abstract class UResourceBundle extends ResourceBundle{
|
|||
/**
|
||||
* Creates a UResourceBundle, from which users can extract resources by using
|
||||
* their corresponding keys.
|
||||
* @note Please use this API for loading non-ICU resources. Java security does not
|
||||
* allow loading of resources across jar files. You must provide your class loader
|
||||
* to load the resources
|
||||
* @param baseName string containing the name of the data package.
|
||||
* If null the default ICU package name is used.
|
||||
* @param locale specifies the locale for which we want to open the resource.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (C) 1996-2006, International Business Machines Corporation and *
|
||||
* Copyright (C) 1996-2007, International Business Machines Corporation and *
|
||||
* others. All Rights Reserved. *
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
@ -127,7 +127,7 @@ public final class VersionInfo
|
|||
* @internal
|
||||
* @deprecated This API is ICU internal only.
|
||||
*/
|
||||
public static final String ICU_DATA_VERSION = "36b";
|
||||
public static final String ICU_DATA_VERSION = "37b";
|
||||
|
||||
/**
|
||||
* ICU4J collator runtime version
|
||||
|
@ -448,7 +448,7 @@ public final class VersionInfo
|
|||
UNICODE_4_0_1 = getInstance(4, 0, 1, 0);
|
||||
UNICODE_4_1 = getInstance(4, 1, 0, 0);
|
||||
UNICODE_5_0 = getInstance(4, 1, 0, 0);
|
||||
ICU_VERSION = getInstance(3, 6, 0, 0);
|
||||
ICU_VERSION = getInstance(3, 7, 1, 0);
|
||||
UCOL_RUNTIME_VERSION = getInstance(6);
|
||||
UCOL_BUILDER_VERSION = getInstance(7);
|
||||
UCOL_TAILORINGS_VERSION = getInstance(1);
|
||||
|
|
Loading…
Add table
Reference in a new issue