From dec8a7e7e3d3415296e28d6263713776b88b4327 Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Tue, 27 Apr 2010 13:45:25 +0200 Subject: Fix off-by-one error at end of Unicode ranges. --- src/org/madore/android/unicodeMap/UnicodeCharacter.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/org') diff --git a/src/org/madore/android/unicodeMap/UnicodeCharacter.java b/src/org/madore/android/unicodeMap/UnicodeCharacter.java index eea9051..6fa8496 100644 --- a/src/org/madore/android/unicodeMap/UnicodeCharacter.java +++ b/src/org/madore/android/unicodeMap/UnicodeCharacter.java @@ -14,11 +14,11 @@ import java.io.IOException; public class UnicodeCharacter implements UnicodeDisplayable { public static enum Range implements UnicodeDisplayable { - BASIC_LATIN(0x0000, 0x0080, "Basic Latin"), - LATIN_1_SUPPLEMENT(0x0080, 0x0100, "Latin-1 Supplement"), - LATIN_EXTENDED_A(0x0100, 0x0180, "Latin Extended-A"), - LATIN_EXTENDED_B(0x0180, 0x0250, "Latin Extended-B"), - IPA_EXTENSIONS(0x0250, 0x02b0, "IPA Extensions"), + BASIC_LATIN(0x0000, 0x007F, "Basic Latin"), + LATIN_1_SUPPLEMENT(0x0080, 0x00FF, "Latin-1 Supplement"), + LATIN_EXTENDED_A(0x0100, 0x017F, "Latin Extended-A"), + LATIN_EXTENDED_B(0x0180, 0x024F, "Latin Extended-B"), + IPA_EXTENSIONS(0x0250, 0x02AF, "IPA Extensions"), SPACING_MODIFIER_LETTERS(0x02B0, 0x02FF, "Spacing Modifier Letters"), COMBINING_DIACRITICAL_MARKS(0x0300, 0x036F, "Combining Diacritical Marks"), GREEK_AND_COPTIC(0x0370, 0x03FF, "Greek and Coptic"), @@ -213,9 +213,9 @@ public class UnicodeCharacter implements UnicodeDisplayable { SUPPLEMENTARY_PRIVATE_USE_AREA_B(0x100000, 0x10FFFF, "Supplementary Private Use Area-B"); protected final int from; protected final int to; protected final String descr; - Range(int from, int to, String descr) { + Range(int from, int last, String descr) { this.from = from; - this.to = to; + this.to = last+1; this.descr = descr; } public int getFrom() { return this.from; } -- cgit v1.2.3