Updated isPrintable to synch with ICU.
X-SVN-Rev: 4159
This commit is contained in:
parent
e1faf1e495
commit
9fec1baba2
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/lang/UCharacter.java,v $
|
||||
* $Date: 2001/03/07 02:52:05 $
|
||||
* $Revision: 1.2 $
|
||||
* $Date: 2001/03/17 01:36:32 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -322,6 +322,10 @@ public final class UCharacter
|
||||
*/
|
||||
private static final char GREEK_SMALL_LETTER_RHO_ = 0x3c2;
|
||||
|
||||
/**
|
||||
* ISO control character first range upper limit 0x0 - 0x1F
|
||||
*/
|
||||
private static final int ISO_CONTROL_FIRST_RANGE_MAX_ = 0x1F;
|
||||
|
||||
// constructor ====================================================
|
||||
|
||||
@ -920,29 +924,6 @@ public final class UCharacter
|
||||
return (ch >= 0 && ch < LAST_CHAR_MASK_);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether the specified code point is a control character or not.
|
||||
* <br>
|
||||
* A code point is considered a control character if it is of either type
|
||||
* <ul>
|
||||
* <li> Cc control character
|
||||
* <li> Cf Format character
|
||||
* <li> Zl line seperator
|
||||
* <li> Zp paragraph seperator
|
||||
* </ul>
|
||||
* @param ch the code point to be determined if it is a control character
|
||||
* @return true if the code point is a control character
|
||||
*/
|
||||
public static boolean isControl(int ch)
|
||||
{
|
||||
int cat = getType(ch);
|
||||
// if props == 0, it will just fall through and return false
|
||||
return cat == UCharacterCategory.CONTROL ||
|
||||
cat == UCharacterCategory.FORMAT ||
|
||||
cat == UCharacterCategory.LINE_SEPARATOR ||
|
||||
cat == UCharacterCategory.PARAGRAPH_SEPARATOR;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether the specified code point is a printable character
|
||||
* according to the Unicode standard.
|
||||
@ -951,31 +932,17 @@ public final class UCharacter
|
||||
*/
|
||||
public static boolean isPrintable(int ch)
|
||||
{
|
||||
if (isISOControl(ch)) {
|
||||
return false;
|
||||
}
|
||||
int cat = getType(ch);
|
||||
// if props == 0, it will just fall through and return false
|
||||
return cat == UCharacterCategory.DECIMAL_DIGIT_NUMBER ||
|
||||
cat == UCharacterCategory.OTHER_NUMBER ||
|
||||
cat == UCharacterCategory.LETTER_NUMBER ||
|
||||
cat == UCharacterCategory.UPPERCASE_LETTER ||
|
||||
cat == UCharacterCategory.LOWERCASE_LETTER ||
|
||||
cat == UCharacterCategory.TITLECASE_LETTER ||
|
||||
cat == UCharacterCategory.MODIFIER_LETTER ||
|
||||
cat == UCharacterCategory.OTHER_LETTER ||
|
||||
cat == UCharacterCategory.NON_SPACING_MARK ||
|
||||
cat == UCharacterCategory.ENCLOSING_MARK ||
|
||||
cat == UCharacterCategory.COMBINING_SPACING_MARK ||
|
||||
cat == UCharacterCategory.SPACE_SEPARATOR ||
|
||||
cat == UCharacterCategory.LINE_SEPARATOR ||
|
||||
cat == UCharacterCategory.PARAGRAPH_SEPARATOR ||
|
||||
cat == UCharacterCategory.DASH_PUNCTUATION ||
|
||||
cat == UCharacterCategory.START_PUNCTUATION ||
|
||||
cat == UCharacterCategory.END_PUNCTUATION ||
|
||||
cat == UCharacterCategory.CONNECTOR_PUNCTUATION ||
|
||||
cat == UCharacterCategory.OTHER_PUNCTUATION ||
|
||||
cat == UCharacterCategory.MATH_SYMBOL ||
|
||||
cat == UCharacterCategory.CURRENCY_SYMBOL ||
|
||||
cat == UCharacterCategory.MODIFIER_SYMBOL ||
|
||||
cat == UCharacterCategory.OTHER_SYMBOL;
|
||||
return (cat != UCharacterCategory.UNASSIGNED &&
|
||||
cat != UCharacterCategory.CONTROL &&
|
||||
cat != UCharacterCategory.FORMAT &&
|
||||
cat != UCharacterCategory.PRIVATE_USE &&
|
||||
cat != UCharacterCategory.SURROGATE &&
|
||||
cat != UCharacterCategory.GENERAL_OTHER_TYPES);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/text/Attic/UCharacter.java,v $
|
||||
* $Date: 2001/03/07 02:52:05 $
|
||||
* $Revision: 1.2 $
|
||||
* $Date: 2001/03/17 01:36:32 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -322,6 +322,10 @@ public final class UCharacter
|
||||
*/
|
||||
private static final char GREEK_SMALL_LETTER_RHO_ = 0x3c2;
|
||||
|
||||
/**
|
||||
* ISO control character first range upper limit 0x0 - 0x1F
|
||||
*/
|
||||
private static final int ISO_CONTROL_FIRST_RANGE_MAX_ = 0x1F;
|
||||
|
||||
// constructor ====================================================
|
||||
|
||||
@ -920,29 +924,6 @@ public final class UCharacter
|
||||
return (ch >= 0 && ch < LAST_CHAR_MASK_);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether the specified code point is a control character or not.
|
||||
* <br>
|
||||
* A code point is considered a control character if it is of either type
|
||||
* <ul>
|
||||
* <li> Cc control character
|
||||
* <li> Cf Format character
|
||||
* <li> Zl line seperator
|
||||
* <li> Zp paragraph seperator
|
||||
* </ul>
|
||||
* @param ch the code point to be determined if it is a control character
|
||||
* @return true if the code point is a control character
|
||||
*/
|
||||
public static boolean isControl(int ch)
|
||||
{
|
||||
int cat = getType(ch);
|
||||
// if props == 0, it will just fall through and return false
|
||||
return cat == UCharacterCategory.CONTROL ||
|
||||
cat == UCharacterCategory.FORMAT ||
|
||||
cat == UCharacterCategory.LINE_SEPARATOR ||
|
||||
cat == UCharacterCategory.PARAGRAPH_SEPARATOR;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether the specified code point is a printable character
|
||||
* according to the Unicode standard.
|
||||
@ -951,31 +932,17 @@ public final class UCharacter
|
||||
*/
|
||||
public static boolean isPrintable(int ch)
|
||||
{
|
||||
if (isISOControl(ch)) {
|
||||
return false;
|
||||
}
|
||||
int cat = getType(ch);
|
||||
// if props == 0, it will just fall through and return false
|
||||
return cat == UCharacterCategory.DECIMAL_DIGIT_NUMBER ||
|
||||
cat == UCharacterCategory.OTHER_NUMBER ||
|
||||
cat == UCharacterCategory.LETTER_NUMBER ||
|
||||
cat == UCharacterCategory.UPPERCASE_LETTER ||
|
||||
cat == UCharacterCategory.LOWERCASE_LETTER ||
|
||||
cat == UCharacterCategory.TITLECASE_LETTER ||
|
||||
cat == UCharacterCategory.MODIFIER_LETTER ||
|
||||
cat == UCharacterCategory.OTHER_LETTER ||
|
||||
cat == UCharacterCategory.NON_SPACING_MARK ||
|
||||
cat == UCharacterCategory.ENCLOSING_MARK ||
|
||||
cat == UCharacterCategory.COMBINING_SPACING_MARK ||
|
||||
cat == UCharacterCategory.SPACE_SEPARATOR ||
|
||||
cat == UCharacterCategory.LINE_SEPARATOR ||
|
||||
cat == UCharacterCategory.PARAGRAPH_SEPARATOR ||
|
||||
cat == UCharacterCategory.DASH_PUNCTUATION ||
|
||||
cat == UCharacterCategory.START_PUNCTUATION ||
|
||||
cat == UCharacterCategory.END_PUNCTUATION ||
|
||||
cat == UCharacterCategory.CONNECTOR_PUNCTUATION ||
|
||||
cat == UCharacterCategory.OTHER_PUNCTUATION ||
|
||||
cat == UCharacterCategory.MATH_SYMBOL ||
|
||||
cat == UCharacterCategory.CURRENCY_SYMBOL ||
|
||||
cat == UCharacterCategory.MODIFIER_SYMBOL ||
|
||||
cat == UCharacterCategory.OTHER_SYMBOL;
|
||||
return (cat != UCharacterCategory.UNASSIGNED &&
|
||||
cat != UCharacterCategory.CONTROL &&
|
||||
cat != UCharacterCategory.FORMAT &&
|
||||
cat != UCharacterCategory.PRIVATE_USE &&
|
||||
cat != UCharacterCategory.SURROGATE &&
|
||||
cat != UCharacterCategory.GENERAL_OTHER_TYPES);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -5,8 +5,8 @@
|
||||
*******************************************************************************
|
||||
*
|
||||
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/text/Attic/UGenPropReader.java,v $
|
||||
* $Date: 2001/03/07 02:52:05 $
|
||||
* $Revision: 1.2 $
|
||||
* $Date: 2001/03/17 01:36:32 $
|
||||
* $Revision: 1.3 $
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
@ -66,7 +66,7 @@ final class UGenPropReader extends UGenReader
|
||||
private static final byte DATA_FORMAT_ID_[] = {(byte)0x55, (byte)0x50,
|
||||
(byte)0x72, (byte)0x6F};
|
||||
private static final byte DATA_FORMAT_VERSION_[] =
|
||||
{(byte)0x1, (byte)0x2, (byte)0x0, (byte)0x0};
|
||||
{(byte)0x1, (byte)0x3, (byte)0x0, (byte)0x0};
|
||||
|
||||
/**
|
||||
* Corrupted error string
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1cf9869af246135c8c52891f308fe202681a7abd2892d8aefd5a99fded6fc40e
|
||||
size 25268
|
||||
oid sha256:83064e82c1c71bf6af23d623fe79f2737c14a1be8aa65eb977a9133e4a8f80b3
|
||||
size 26420
|
||||
|
Loading…
Reference in New Issue
Block a user