Index: libs/locale/src/icu/formatter.cpp =================================================================== --- libs/locale/src/icu/formatter.cpp (revision 86291) +++ libs/locale/src/icu/formatter.cpp (working copy) @@ -240,7 +240,7 @@ sdf->toPattern(tmp); } else { - tmp=alt; + tmp=icu::UnicodeString(alt, -1, US_INV); } return tmp; @@ -250,13 +250,13 @@ { switch(c) { case 'a': // Abbr Weekday - return "EE"; + return UNICODE_STRING_SIMPLE("EE"); case 'A': // Full Weekday - return "EEEE"; + return UNICODE_STRING_SIMPLE("EEEE"); case 'b': // Abbr Month - return "MMM"; + return UNICODE_STRING_SIMPLE("MMM"); case 'B': // Full Month - return "MMMM"; + return UNICODE_STRING_SIMPLE("MMMM"); case 'c': // DateTile Full { if(cache) @@ -270,37 +270,37 @@ // case 'C': // Century -> 1980 -> 19 // retur case 'd': // Day of Month [01,31] - return "dd"; + return UNICODE_STRING_SIMPLE("dd"); case 'D': // %m/%d/%y - return "MM/dd/YY"; + return UNICODE_STRING_SIMPLE("MM/dd/YY"); case 'e': // Day of Month [1,31] - return "d"; + return UNICODE_STRING_SIMPLE("d"); case 'h': // == b - return "MMM"; + return UNICODE_STRING_SIMPLE("MMM"); case 'H': // 24 clock hour 00,23 - return "HH"; + return UNICODE_STRING_SIMPLE("HH"); case 'I': // 12 clock hour 01,12 - return "hh"; + return UNICODE_STRING_SIMPLE("hh"); case 'j': // day of year 001,366 - return "D"; + return UNICODE_STRING_SIMPLE("D"); case 'm': // month as [01,12] - return "MM"; + return UNICODE_STRING_SIMPLE("MM"); case 'M': // minute [00,59] - return "mm"; + return UNICODE_STRING_SIMPLE("mm"); case 'n': // \n - return "\n"; + return UNICODE_STRING_SIMPLE("\n"); case 'p': // am-pm - return "a"; + return UNICODE_STRING_SIMPLE("a"); case 'r': // time with AM/PM %I:%M:%S %p - return "hh:mm:ss a"; + return UNICODE_STRING_SIMPLE("hh:mm:ss a"); case 'R': // %H:%M - return "HH:mm"; + return UNICODE_STRING_SIMPLE("HH:mm"); case 'S': // second [00,61] - return "ss"; + return UNICODE_STRING_SIMPLE("ss"); case 't': // \t - return "\t"; + return UNICODE_STRING_SIMPLE("\t"); case 'T': // %H:%M:%S - return "HH:mm:ss"; + return UNICODE_STRING_SIMPLE("HH:mm:ss"); /* case 'u': // weekday 1,7 1=Monday case 'U': // week number of year [00,53] Sunday first case 'V': // week number of year [01,53] Moday first @@ -325,15 +325,15 @@ ); } case 'y': // Year [00-99] - return "YY"; + return UNICODE_STRING_SIMPLE("YY"); case 'Y': // Year 1998 - return "YYYY"; + return UNICODE_STRING_SIMPLE("YYYY"); case 'Z': // timezone - return "vvvv"; + return UNICODE_STRING_SIMPLE("vvvv"); case '%': // % - return "%"; + return UNICODE_STRING_SIMPLE("%"); default: - return ""; + return UNICODE_STRING_SIMPLE(""); } } @@ -352,17 +352,17 @@ c=ftime[i]; } if(escaped) { - result+="'"; + result+=UNICODE_STRING_SIMPLE("'"); escaped=false; } result+=strftime_to_icu_symbol(c,locale); } else if(c=='\'') { - result+="''"; + result+=UNICODE_STRING_SIMPLE("''"); } else { if(!escaped) { - result+="'"; + result+=UNICODE_STRING_SIMPLE("'"); escaped=true; } result+=c; @@ -369,7 +369,7 @@ } } if(escaped) - result+="'"; + result+=UNICODE_STRING_SIMPLE("'"); return result; } Index: libs/locale/src/icu/time_zone.cpp =================================================================== --- libs/locale/src/icu/time_zone.cpp (revision 86291) +++ libs/locale/src/icu/time_zone.cpp (working copy) @@ -50,7 +50,7 @@ return icu::TimeZone::createDefault(); } else { - return icu::TimeZone::createTimeZone(time_zone.c_str()); + return icu::TimeZone::createTimeZone(icu::UnicodeString(time_zone.c_str(), static_cast(time_zone.length()))); } } @@ -211,7 +211,7 @@ { if(!time_zone.empty()) { - return icu::TimeZone::createTimeZone(time_zone.c_str()); + return icu::TimeZone::createTimeZone(icu::UnicodeString(time_zone.c_str(), static_cast(time_zone.length()))); } std::auto_ptr tz(icu::TimeZone::createDefault()); icu::UnicodeString id; @@ -226,7 +226,7 @@ // if we failed fallback to ICU's time zone return tz.release(); } - return icu::TimeZone::createTimeZone(real_id.c_str()); + return icu::TimeZone::createTimeZone(icu::UnicodeString(real_id.c_str(), static_cast(real_id.length()))); } #endif // bug workaround