#include "uvector.h"
#include "cstr.h"
#include "dayperiodrules.h"
+#include "tznames_impl.h" // ZONE_NAME_U16_MAX
#if defined( U_DEBUG_CALSVC ) || defined (U_DEBUG_CAL)
#include <stdio.h>
// class SimpleDateFormat
// *****************************************************************************
-// Some zone display names involving supplementary characters can be over 50 chars, 100 UTF-16 code units, 200 UTF-8 bytes
-#define ZONE_NAME_U16_MAX 128
-
U_NAMESPACE_BEGIN
/**
#include "tznames_impl.h" // TextTrieMap
#include "patternprops.h"
-// Some zone display names involving supplementary characters can be over 50 chars, 100 UTF-16 code units, 200 UTF-8 bytes
-#define ZONE_NAME_U16_MAX 128
-
U_NAMESPACE_BEGIN
// Bit flags used by the parse method.
U_NAMESPACE_BEGIN
#define ZID_KEY_MAX 128
-// Some zone display names involving supplementary characters can be over 50 chars, 100 UTF-16 code units, 200 UTF-8 bytes
-#define ZONE_NAME_U16_MAX 128
static const char gZoneStrings[] = "zoneStrings";
#include "unicode/strenum.h"
#include "unicode/ustring.h"
#include "unicode/timezone.h"
+#include "unicode/utf16.h"
#include "tznames_impl.h"
#include "cmemory.h"
// for folding we need to get a complete code point.
// size of character may grow after fold operation;
// then we need to get result as UTF16 code units.
- UChar32 c32 = text.char32At(index++);
- if (c32 >= 0x10000) {
- index++;
- }
+ UChar32 c32 = text.char32At(index);
+ index += U16_LENGTH(c32);
UnicodeString tmp(c32);
tmp.foldCase();
int32_t tmpidx = 0;
#include "uvector.h"
#include "umutex.h"
+// Some zone display names involving supplementary characters can be over 50 chars, 100 UTF-16 code units, 200 UTF-8 bytes
+#define ZONE_NAME_U16_MAX 128
+
U_NAMESPACE_BEGIN
/*
String digits = null;
if (numberFormat instanceof DecimalFormat) {
DecimalFormatSymbols decsym = ((DecimalFormat) numberFormat).getDecimalFormatSymbols();
- String[] strDigits = decsym.getDigitStrings();
+ String[] strDigits = decsym.getDigitStringsLocal();
// Note: TimeZoneFormat#setGMTOffsetDigits() does not support string array,
// so we need to concatenate digits to make a single string.
StringBuilder digitsBuf = new StringBuilder();
/* Skip this for Chinese calendar, moved from ChineseDateFormat */
if ( override != null && (override.compareTo("hebr") == 0 || override.indexOf("y=hebr") >= 0) && value < 1000 ) {
value += HEBREW_CAL_CUR_MILLENIUM_START_YEAR;
- } else if (count == 2 && text.codePointCount(start, pos.getIndex()) == 2 && cal.haveDefaultCentury()
- && countDigits(text, start, pos.getIndex()) == 2) {
+ } else if (count == 2 && countDigits(text, start, pos.getIndex()) == 2 && cal.haveDefaultCentury()) {
// Assume for example that the defaultCenturyStart is 6/18/1903.
// This means that two-digit years will be forced into the range
// 6/18/1903 to 6/17/2003. As a result, years 00, 01, and 02