]> granicus.if.org Git - icu/log
icu
6 years agoICU-20142 Document the skeleton for MessageFormat number arguments (#121)
Mihai Nita [Fri, 21 Sep 2018 01:11:01 +0000 (18:11 -0700)]
ICU-20142 Document the skeleton for MessageFormat number arguments (#121)

6 years agoICU-20066 fixup .travis.yml (#160)
Steven R. Loomis [Thu, 20 Sep 2018 23:09:05 +0000 (16:09 -0700)]
ICU-20066 fixup .travis.yml (#160)

* ICU-20066 fixup .travis.yml

- correct typo from 518f10b7a90a7bca1dd554601a681ba9f341f583
859d6090dc1feee160e870e8ef3d39197a98e1d9 added a PR template that needed exclusion

6 years agoICU-20073 Do not parse stray percent sign in strict mode. (#145)
Shane [Thu, 20 Sep 2018 21:47:25 +0000 (14:47 -0700)]
ICU-20073 Do not parse stray percent sign in strict mode. (#145)

6 years agoICU-13266 Clarifying documentation for NumberFormat#equals(). (#146)
Shane [Thu, 20 Sep 2018 21:47:10 +0000 (14:47 -0700)]
ICU-13266 Clarifying documentation for NumberFormat#equals(). (#146)

6 years agoICU-13824 Fixing MeasureFormat#getWidth() to not return @internal value. (#143)
Shane [Thu, 20 Sep 2018 21:46:48 +0000 (14:46 -0700)]
ICU-13824 Fixing MeasureFormat#getWidth() to not return @internal value. (#143)

6 years agoICU-13830 Fixing CurrencyDisplayNames boolean attribute behavior. (#141)
Shane [Thu, 20 Sep 2018 21:46:32 +0000 (14:46 -0700)]
ICU-13830 Fixing CurrencyDisplayNames boolean attribute behavior. (#141)

6 years agoICU-13850 Make CurrencyUnit safe with 1-length and 2-length strings. (#133)
Shane [Thu, 20 Sep 2018 21:44:48 +0000 (14:44 -0700)]
ICU-13850 Make CurrencyUnit safe with 1-length and 2-length strings. (#133)

Also adds expectError to IcuTestErrorCode.

6 years agoICU-20066 add a copyright scan stage (#26)
Steven R. Loomis [Thu, 20 Sep 2018 21:20:32 +0000 (14:20 -0700)]
ICU-20066 add a copyright scan stage (#26)

- name the travis build steps
- copy cpyskip.txt to /.cpyskip.txt
- add one named "lint" which runs cpyscan.pl
- remove network access from Cpy.pm (requires installation)

6 years agoICU-20119 Merge pull request #152 from gnrunge/icu63_1
gnrunge [Thu, 20 Sep 2018 19:39:45 +0000 (12:39 -0700)]
ICU-20119 Merge pull request #152 from gnrunge/icu63_1

ICU-20119 Smalles fixes for public and internal header test failures.

6 years agoICU-20081 ucase_swap add parens, avoid warning (#156)
Markus Scherer [Thu, 20 Sep 2018 18:33:14 +0000 (11:33 -0700)]
ICU-20081 ucase_swap add parens, avoid warning (#156)

6 years agoICU-20119 Merge github.com:unicode-org/icu into icu63_1
Norbert Runge [Thu, 20 Sep 2018 16:03:58 +0000 (09:03 -0700)]
ICU-20119 Merge github.com:unicode-org/icu into icu63_1

6 years agoICU-20153 Make ICU4J JapaneseCalendar constants non-inlineable. (#155)
Yoshito Umaoka [Thu, 20 Sep 2018 08:00:47 +0000 (04:00 -0400)]
ICU-20153 Make ICU4J JapaneseCalendar constants non-inlineable. (#155)

6 years agoICU-20119 Adds comment to change that fixes a header test failure.
Norbert Runge [Wed, 19 Sep 2018 20:55:50 +0000 (13:55 -0700)]
ICU-20119 Adds comment to change that fixes a header test failure.

6 years agoICU-13832 Transliterator: move rule syntax docs from internal class to public (#150)
Markus Scherer [Thu, 20 Sep 2018 04:51:49 +0000 (21:51 -0700)]
ICU-13832 Transliterator: move rule syntax docs from internal class to public (#150)

6 years agoICU-20119 Smalles fixes for public and internal header test failures.
Norbert Runge [Wed, 19 Sep 2018 19:49:00 +0000 (12:49 -0700)]
ICU-20119 Smalles fixes for public and internal header test failures.

6 years agoICU-13417 Replace fixed buffers in uloc_tag.cpp with CharString.
Fredrik Roubert [Thu, 20 Sep 2018 00:52:37 +0000 (17:52 -0700)]
ICU-13417 Replace fixed buffers in uloc_tag.cpp with CharString.

This gets rid of those fixed buffers that caused ICU-13417 to be filed
in the first place, those that prevent handling language tags with very
large amounts of keywords.

A number of fixed buffers will still remain in uloc_tag.cpp (and
elsewhere in the locale handling code) for the time being, but this
change is a necessary first step in cleaning up this code and will
alleviate the most pressing problem encountered by ICU4C users.

An off-by-one error in _getKeywords() caused uloc_canonicalize() to not
write out the final keyword value in case the result would fill up the
buffer exactly, resulting in U_STRING_NOT_TERMINATED_WARNING.

6 years agoICU-20081 ucase_swap() fix version range check (#151)
Markus Scherer [Wed, 19 Sep 2018 19:04:17 +0000 (12:04 -0700)]
ICU-20081 ucase_swap() fix version range check (#151)

6 years agoICU-20150 API status of equals()/hashCode() should match the ICU class's status ...
Yoshito Umaoka [Wed, 19 Sep 2018 23:02:49 +0000 (19:02 -0400)]
ICU-20150 API status of equals()/hashCode() should match the ICU class's status (#153)

- Updated API status of java.lang.Object method overrides (equals/hashCode/toString/clone) to match status of declaring class. There are some API comments that is insufficient, or incorrect, or not appropriate after the change. Most of these issues were fixed.

- APIStatusConsistencyChecker and ant tasks invoking the check, designed for checking this requirement. For now, Normalizer#clone() does not satisfy the requirement, but unchanged on purpose. The tool can accept exception.

- DeprecatedAPIChecker had a problem for handling non-static inner class's constructor. CodePointMap$StringIterator is the very first instance of such class in ICU4J. The problem was fixed by removing the implicit param scanned by reflection.

- This commit includes a lot of changes made by Eclipse project configuration - removing spaces in blank lines/end of statement, and removeal of redundant generics type declaration.

6 years agoICU-20119 BRS63rc Update version number for ICU4C and ICU4J. Update readme files...
Jeff Genovy [Wed, 19 Sep 2018 18:36:48 +0000 (11:36 -0700)]
ICU-20119 BRS63rc Update version number for ICU4C and ICU4J. Update readme files. (#144)

BRS: Update version number for ICU 63 RC for ICU4J and ICU4C, also update readme files.

6 years agoICU-20147 Fix MSVC warning C4251, and fix a few other warnings too. (#134)
Jeff Genovy [Wed, 19 Sep 2018 17:05:27 +0000 (10:05 -0700)]
ICU-20147 Fix MSVC warning C4251, and fix a few other warnings too. (#134)

6 years agoICU-20076 MSVC Warning clean up. Define _HAS_EXCEPTIONS=0 in ICU library code (#128)
Jeff Genovy [Wed, 19 Sep 2018 08:21:57 +0000 (01:21 -0700)]
ICU-20076 MSVC Warning clean up. Define _HAS_EXCEPTIONS=0 in ICU library code (#128)

In an effort to reduce the number of warnings that building ICU emits, we should set the following define for ICU4C library code when building using MSVC/VisualStudio: _HAS_EXCEPTIONS=0
This tells the MSVC implementation of the STL that exceptions should not be used - which is fine for ICU4C library code, as the library code does not make use of exceptions at all.

6 years agoICU-13827 Clean up ICU4C "wintz.cpp" time zone detection code.
Jeff Genovy [Wed, 19 Sep 2018 07:48:16 +0000 (00:48 -0700)]
ICU-13827 Clean up ICU4C "wintz.cpp" time zone detection code.

- Use stack allocated UResouceBundle to reduce number of calls to malloc (in a method that can't report back an error if Out-Of-Memory [OOM] happens).
- Use LocalUResourcePointer for automatic clean-up of UResouceBundle.
- Use uprv_strdup instead of calloc + strcpy.
- Changes comments, formatting, etc.

6 years agoICU-20037 Fixing ScientificMatcher integer overflow. (#138)
Shane [Wed, 19 Sep 2018 01:10:38 +0000 (18:10 -0700)]
ICU-20037 Fixing ScientificMatcher integer overflow. (#138)

Also restricts parsing to read only one exponent per string.

6 years agoICU-13417 Pass length from Locale::forLanguageTag() to ultag_parse().
Fredrik Roubert [Tue, 18 Sep 2018 23:53:22 +0000 (16:53 -0700)]
ICU-13417 Pass length from Locale::forLanguageTag() to ultag_parse().

If not passed a length, ultag_parse() will call uprv_strlen(), requiring
the input buffer to be NUL terminated. This is unnecessary.

6 years agoICU-20119 Merge pull request #131 from gnrunge/icu63_1
gnrunge [Tue, 18 Sep 2018 23:49:47 +0000 (16:49 -0700)]
ICU-20119 Merge pull request #131 from gnrunge/icu63_1

ICU-20119 Migrates script that checks for proper UTF-8 encoding in so…

6 years agoICU-20063 Make setSignificantDigitsUsed more friendly.
Shane Carr [Tue, 18 Sep 2018 08:30:31 +0000 (01:30 -0700)]
ICU-20063 Make setSignificantDigitsUsed more friendly.

6 years agoICU-20119 Review changes.
Norbert Runge [Tue, 18 Sep 2018 23:44:39 +0000 (16:44 -0700)]
ICU-20119 Review changes.

6 years agoICU-20050 Fixing memory leaks in move and copy assignment in Number*Formatter.
Shane Carr [Tue, 18 Sep 2018 09:14:24 +0000 (02:14 -0700)]
ICU-20050 Fixing memory leaks in move and copy assignment in Number*Formatter.

6 years agoICU-20119 Merge github.com:unicode-org/icu into icu63_1
Norbert Runge [Tue, 18 Sep 2018 23:32:58 +0000 (16:32 -0700)]
ICU-20119 Merge github.com:unicode-org/icu into icu63_1

6 years agoICU-20104 Fix lazy init in Indian Calendar. Now matches other calendars. (#108)
Andy Heninger [Tue, 18 Sep 2018 20:04:15 +0000 (13:04 -0700)]
ICU-20104 Fix lazy init in Indian Calendar. Now matches other calendars. (#108)

* ICU-20104 Fix lazy init in Indian Calendar. Now matches other calendars.

* ICU-20104 export class IndianCalendar for testing.

* ICU-20104 shot-in-the-dark Windows build experiment.

* ICU-20104 fix memory leak in added test.

6 years agoICU-20119 Delete script, was renamed to icu-file-utf8-check.py.
Norbert Runge [Tue, 18 Sep 2018 23:02:35 +0000 (16:02 -0700)]
ICU-20119 Delete script, was renamed to icu-file-utf8-check.py.

6 years agoICU-20145 Allow passing locale in ICU4C "date" sample program for testing without...
Jeff Genovy [Tue, 18 Sep 2018 19:24:58 +0000 (12:24 -0700)]
ICU-20145 Allow passing locale in ICU4C "date" sample program for testing without using the environment variable "LC_ALL". (#125)

The ICU4C sample "date" program just uses the "default" ICU locale. This change lets you pass in an explicit locale argument for testing on platforms like Windows that don't have/use the environment variable "LC_ALL".

6 years agoICU-20119 Additional changes to UTF-8 checking script.
Norbert Runge [Tue, 18 Sep 2018 22:57:51 +0000 (15:57 -0700)]
ICU-20119 Additional changes to UTF-8 checking script.

6 years agoICU-20140 Allow duplicated keys in U-extension per RFC 6067 (#136)
jungshik [Tue, 18 Sep 2018 17:23:12 +0000 (10:23 -0700)]
ICU-20140 Allow duplicated keys in U-extension per RFC 6067 (#136)

* ICU-20140 Allow duplicated keys in U-extension per RFC 6067

RFC 6067 [1] does allow duplicate keywords, but ICU4C's
uloc_forLanguageCode rejects it as invalid.

Change it to accept duplicate keywords and honor only the
1st one while ignoring subsequent ones per RFC 6067.

[1] Unicode extension to BCP 47:
    https://tools.ietf.org/html/rfc6067

* ICU-20140 Add ICU4J test and tweak ICU4C test

ICU4J test diverges from ICU4C tests:

1. Handling of duplicate variants in ICU4J seem to be wrong:
   https://unicode-org.atlassian.net/browse/ICU-20148
2. ULocale.forLanguageTag only throws NullPointException so
   that ICU4C's test for duplicate attributes cannot be ported.

6 years agoICU-20119 Migrates script that checks for proper UTF-8 encoding in source
Norbert Runge [Mon, 17 Sep 2018 23:27:49 +0000 (16:27 -0700)]
ICU-20119 Migrates script that checks for proper UTF-8 encoding in source
files and for absence of BOM in all but text files into the github environment.

6 years agoICU-20136 Check U_HAVE_TZ* values (#114)
Don [Tue, 18 Sep 2018 17:18:25 +0000 (10:18 -0700)]
ICU-20136 Check U_HAVE_TZ* values (#114)

* Add check for U_HAVE_TZSET

* Add check for U_HAVE_TZNAME

6 years agoICU-13645 Remove redundant invocations of the Locale copy constructor.
Fredrik Roubert [Mon, 17 Sep 2018 19:56:43 +0000 (12:56 -0700)]
ICU-13645 Remove redundant invocations of the Locale copy constructor.

6 years agoICU-20119 BRS63 Currency numeric code data update - VES and UYW (#126)
Yoshito Umaoka [Tue, 18 Sep 2018 16:22:59 +0000 (12:22 -0400)]
ICU-20119 BRS63 Currency numeric code data update - VES and UYW (#126)

6 years agoICU-12973 Enable UWP version of ICU to use Environment variable ICU_ENABLE_TENTATIVE_...
Jeff Genovy [Mon, 17 Sep 2018 21:33:08 +0000 (14:33 -0700)]
ICU-12973 Enable UWP version of ICU to use Environment variable ICU_ENABLE_TENTATIVE_ERA for testing placeholder names (#124)

- Enable UWP version of ICU to use Environment variable ICU_ENABLE_TENTATIVE_ERA for testing placeholder era names.
- Use LocalArray<int32_t> for the Era Start Dates to simply memory management, so that goto can be removed.
- Also fix some minor typos in header file.

6 years agoICU-20075 For POSIX, increase correctedPOSIXLocale size for localeID expansion with...
pedberg-icu [Tue, 18 Sep 2018 16:21:45 +0000 (09:21 -0700)]
ICU-20075 For POSIX, increase correctedPOSIXLocale size for localeID expansion with @ (#112)

6 years agoICU-11276 Adding NumberRangeFormatter (#87)
Shane [Sun, 16 Sep 2018 09:07:37 +0000 (02:07 -0700)]
ICU-11276 Adding NumberRangeFormatter (#87)

Formats number ranges, including currencies and measurement units.

6 years agoICU-20058 Fix mimimum significant digits in engineering notation
Victor Chang [Fri, 14 Sep 2018 13:24:05 +0000 (14:24 +0100)]
ICU-20058 Fix mimimum significant digits in engineering notation

- Follow the spec to calculate the mimimum significant digits in engineering notation
- The bug is regression since ICU 58. The new test still passes on
ICU58-based DecimalFormat
- Maximum significant digits is not changed

6 years agoICU-11276 Comment about getParameters() return type.
Shane Carr [Sat, 15 Sep 2018 04:23:52 +0000 (21:23 -0700)]
ICU-11276 Comment about getParameters() return type.

6 years agoICU-20135 Use __has_declspec_attribute (#113)
Don [Tue, 18 Sep 2018 16:17:05 +0000 (09:17 -0700)]
ICU-20135 Use __has_declspec_attribute (#113)

> Clang comes with __has_declspec_attribute to detect whether the name of an attribute is implemented as a MS style __declspec.

> This adds __has_declspect_attribute to the list of clang compatibility macros and then uses that check to determine if __declspec(dllimport) and __declspec(dllexport) can be used.

6 years agoICU-11276 Adding more test cases. Fixing minor issues with extended locales.
Shane Carr [Sat, 15 Sep 2018 04:20:13 +0000 (21:20 -0700)]
ICU-11276 Adding more test cases. Fixing minor issues with extended locales.

6 years agoICU-20133 Undeprecate Transliterator.Position#hashCode (#119)
gvictor [Tue, 18 Sep 2018 15:54:41 +0000 (16:54 +0100)]
ICU-20133 Undeprecate Transliterator.Position#hashCode (#119)

Create a preper hash code with Objects.hash instead of returning 42

6 years agoICU-11276 Replying to Mark review feedback.
Shane Carr [Sat, 15 Sep 2018 02:03:01 +0000 (19:03 -0700)]
ICU-11276 Replying to Mark review feedback.

6 years agoICU-20119 BRS63RC Fix javac/javadoc/Eclipse errors/warnings (#132)
Yoshito Umaoka [Tue, 18 Sep 2018 05:31:03 +0000 (01:31 -0400)]
ICU-20119 BRS63RC Fix javac/javadoc/Eclipse errors/warnings (#132)

* ICU-20119 BRS63RC Fixing java compiler warnings

* ICU-20119 BRS63RC Fixing JavaDoc errors

6 years agoICU-11276 Replying to Andy review feedback.
Shane Carr [Sat, 15 Sep 2018 01:08:41 +0000 (18:08 -0700)]
ICU-11276 Replying to Andy review feedback.

6 years agoICU-11276 int -> int32_t in number_compact.cpp
Shane Carr [Sat, 15 Sep 2018 00:59:12 +0000 (17:59 -0700)]
ICU-11276 int -> int32_t in number_compact.cpp

6 years agoICU-11276 Porting pluralRanges support to Java.
Shane Carr [Sat, 15 Sep 2018 00:54:51 +0000 (17:54 -0700)]
ICU-11276 Porting pluralRanges support to Java.

6 years agoICU-11276 Fixing pluralRanges data loading and adding more tests.
Shane Carr [Fri, 14 Sep 2018 23:33:22 +0000 (16:33 -0700)]
ICU-11276 Fixing pluralRanges data loading and adding more tests.

6 years agoICU-11276 ModifierStore wired up in LongNameHandler (C++).
Shane Carr [Fri, 14 Sep 2018 08:30:55 +0000 (01:30 -0700)]
ICU-11276 ModifierStore wired up in LongNameHandler (C++).

6 years agoICU-11276 Plural ranges loaded from data; first implementations of ModifierStore.
Shane Carr [Fri, 14 Sep 2018 07:53:32 +0000 (00:53 -0700)]
ICU-11276 Plural ranges loaded from data; first implementations of ModifierStore.

6 years agoICU-11276 Additional build.xml lines for pluralRanges.
Shane Carr [Fri, 14 Sep 2018 07:52:09 +0000 (00:52 -0700)]
ICU-11276 Additional build.xml lines for pluralRanges.

6 years agoICU-11276 Adding UChar* method in CharString.
Shane Carr [Fri, 14 Sep 2018 07:51:36 +0000 (00:51 -0700)]
ICU-11276 Adding UChar* method in CharString.

6 years agoICU-11276 Adding ModifierStore, groundwork for plural range support.
Shane Carr [Fri, 14 Sep 2018 05:16:29 +0000 (22:16 -0700)]
ICU-11276 Adding ModifierStore, groundwork for plural range support.

6 years agoICU-11276 Adding pluralRanges.txt data file.
Shane Carr [Fri, 14 Sep 2018 03:44:45 +0000 (20:44 -0700)]
ICU-11276 Adding pluralRanges.txt data file.

The code was already in NewLdml2IcuConverter, but it was not being called from ICU.

6 years agoICU-11276 Fixing ICU4J number range test failures.
Shane Carr [Fri, 7 Sep 2018 19:24:47 +0000 (12:24 -0700)]
ICU-11276 Fixing ICU4J number range test failures.

6 years agoICU-11276 One more attempt at fixing test failure.
Shane Carr [Fri, 7 Sep 2018 19:15:20 +0000 (12:15 -0700)]
ICU-11276 One more attempt at fixing test failure.

6 years agoICU-11276 Fixing test failure related to number range.
Shane Carr [Fri, 7 Sep 2018 14:41:19 +0000 (07:41 -0700)]
ICU-11276 Fixing test failure related to number range.

6 years agoICU-11276 Adding Java NumberRangeFormatter implementation.
Shane Carr [Fri, 7 Sep 2018 12:30:37 +0000 (05:30 -0700)]
ICU-11276 Adding Java NumberRangeFormatter implementation.

6 years agoICU-11276 Fixing ASAN issue related to number range formatting.
Shane Carr [Thu, 6 Sep 2018 09:03:52 +0000 (02:03 -0700)]
ICU-11276 Fixing ASAN issue related to number range formatting.

6 years agoICU-11276 Deleting impl object in destructor.
Shane Carr [Thu, 6 Sep 2018 06:47:58 +0000 (23:47 -0700)]
ICU-11276 Deleting impl object in destructor.

6 years agoICU-11276 Adding test cases and more API coverage.
Shane Carr [Thu, 6 Sep 2018 06:04:32 +0000 (23:04 -0700)]
ICU-11276 Adding test cases and more API coverage.

6 years agoICU-11276 Adding number range spacing heuristic and fixing data loading.
Shane Carr [Thu, 6 Sep 2018 04:46:37 +0000 (21:46 -0700)]
ICU-11276 Adding number range spacing heuristic and fixing data loading.

6 years agoICU-11276 Wiring SimpleFormatter logic into NumberRangeFormatter.
Shane Carr [Thu, 6 Sep 2018 03:44:27 +0000 (20:44 -0700)]
ICU-11276 Wiring SimpleFormatter logic into NumberRangeFormatter.

6 years agoICU-11276 Wiring new NumberRangeFormatterImpl code into the API.
Shane Carr [Thu, 6 Sep 2018 01:37:48 +0000 (18:37 -0700)]
ICU-11276 Wiring new NumberRangeFormatterImpl code into the API.

6 years agoICU-11276 Implementing new methods on Modifier.
Shane Carr [Thu, 6 Sep 2018 01:16:32 +0000 (18:16 -0700)]
ICU-11276 Implementing new methods on Modifier.

Also removes status code from two of the other methods; the status code was used only by MutablePatternModifier for the case of a malformed pattern; this error is better handled directly in the apply() method.

6 years agoICU-11276 Initial NumberRangeFormatter implementation. Needs data loading and implem...
Shane Carr [Thu, 6 Sep 2018 00:42:41 +0000 (17:42 -0700)]
ICU-11276 Initial NumberRangeFormatter implementation.  Needs data loading and implementation of new methods on Modifier.

6 years agoICU-11276 Move rounding into preProcess function since the micro generator could...
Shane Carr [Wed, 5 Sep 2018 23:25:10 +0000 (16:25 -0700)]
ICU-11276 Move rounding into preProcess function since the micro generator could have already applied rounding.

6 years agoICU-13645 Add C++11 move constructor and assign operator to Locale.
Fredrik Roubert [Sat, 15 Sep 2018 03:07:58 +0000 (20:07 -0700)]
ICU-13645 Add C++11 move constructor and assign operator to Locale.

6 years agoICU-11276 Rewriring NumberFormatterImpl to expose information needed for NumberRangeF...
Shane Carr [Wed, 5 Sep 2018 22:23:36 +0000 (15:23 -0700)]
ICU-11276 Rewriring NumberFormatterImpl to expose information needed for NumberRangeFormatter.

6 years agoICU-13645 Clean up implementation of Locale::operator=(const Locale&).
Fredrik Roubert [Sat, 15 Sep 2018 00:17:29 +0000 (17:17 -0700)]
ICU-13645 Clean up implementation of Locale::operator=(const Locale&).

Organizing the implementation like this instead will (hopefully) make it
more clear what's being done and make it possible to use analogous
control flow in the copy and move implementations of operator=().

6 years agoICU-11276 Replying to code review comments.
Shane Carr [Thu, 30 Aug 2018 23:20:13 +0000 (16:20 -0700)]
ICU-11276 Replying to code review comments.

6 years agoICU-13417 Add the Locale::get(Unicode)?Keywords() functions.
Fredrik Roubert [Sat, 15 Sep 2018 00:12:06 +0000 (17:12 -0700)]
ICU-13417 Add the Locale::get(Unicode)?Keywords() functions.

They are C++ template wrappers around Locale::createKeywords() and
Locale::createUnicodeKeywords() respectively, that write to any
container for which an STL style output iterator can be provided.

The simplest imaginable usage would just look like this:

    std::string keys[16];
    l.getKeywords<std::string>(keys, status);

The unit test has a more elaborate invocation, writing to an std::set<>.

6 years agoICU-11276 Fixing Javadoc warnings in NumberRangeFormatter.
Shane Carr [Thu, 30 Aug 2018 01:02:16 +0000 (18:02 -0700)]
ICU-11276 Fixing Javadoc warnings in NumberRangeFormatter.

6 years agoICU-13417 Add the Locale::(addLikely|minimize)Subtags() functions.
Fredrik Roubert [Thu, 13 Sep 2018 21:14:26 +0000 (14:14 -0700)]
ICU-13417 Add the Locale::(addLikely|minimize)Subtags() functions.

They are C++ wrappers of uloc_addLikelySubtags() and uloc_minimizeSubtags()
respectively, that take care of dynamic memory management.

6 years agoICU-11276 Feedback from ICU-TC. Fixing doxygen warnings.
Shane Carr [Thu, 30 Aug 2018 00:42:17 +0000 (17:42 -0700)]
ICU-11276 Feedback from ICU-TC. Fixing doxygen warnings.

6 years agoICU-13417 Add the Locale::(get|set)(Unicode)?KeywordValue() functions.
Fredrik Roubert [Fri, 14 Sep 2018 21:25:35 +0000 (14:25 -0700)]
ICU-13417 Add the Locale::(get|set)(Unicode)?KeywordValue() functions.

6 years agoICU-11276 Adding C++ base implementation of NumberRangeFormatter, including unit...
Shane Carr [Wed, 29 Aug 2018 08:22:21 +0000 (01:22 -0700)]
ICU-11276 Adding C++ base implementation of NumberRangeFormatter, including unit test.

6 years agoICU-13417 Improved error handling in Locale::create(Unicode)?Keywords().
Fredrik Roubert [Fri, 14 Sep 2018 20:16:59 +0000 (13:16 -0700)]
ICU-13417 Improved error handling in Locale::create(Unicode)?Keywords().

Follow-up from pull request #117:

Specify buffer size in only one place, explicitly check status before
proceeding and set status = U_MEMORY_ALLOCATION_ERROR if new fails.

6 years agoICU-11276 Fixing typos in numberformatter.h
Shane Carr [Wed, 29 Aug 2018 05:36:33 +0000 (22:36 -0700)]
ICU-11276 Fixing typos in numberformatter.h

6 years agoICU-13417 Add the Locale::createUnicodeKeywords() function.
Fredrik Roubert [Thu, 13 Sep 2018 23:08:29 +0000 (16:08 -0700)]
ICU-13417 Add the Locale::createUnicodeKeywords() function.

This is a wrapper of Locale::createKeywords() that under the hood calls
uloc_toUnicodeLocaleKey() for each key before returning it, so that the
caller won't have to do this.

6 years agoICU-11276 Assorted Java NumberRangeFormatter API improvements.
Shane Carr [Wed, 29 Aug 2018 05:36:09 +0000 (22:36 -0700)]
ICU-11276 Assorted Java NumberRangeFormatter API improvements.

6 years agoICU-20119 Small refactor to ICU4J travis file.
Shane Carr [Fri, 7 Sep 2018 23:01:46 +0000 (16:01 -0700)]
ICU-20119 Small refactor to ICU4J travis file.

6 years agoICU-11276 Adding initial header files for NumberRangeFormatter.
Shane Carr [Wed, 29 Aug 2018 05:34:38 +0000 (22:34 -0700)]
ICU-11276 Adding initial header files for NumberRangeFormatter.

6 years agoICU-13801 Clarify Javadoc for BreakIterator.setText() (#69)
Andy Heninger [Thu, 13 Sep 2018 19:46:17 +0000 (12:46 -0700)]
ICU-13801 Clarify Javadoc for BreakIterator.setText() (#69)

6 years agoICU-11276 Adding enums and more API docs.
Shane Carr [Wed, 29 Aug 2018 04:10:28 +0000 (21:10 -0700)]
ICU-11276 Adding enums and more API docs.

6 years agoICU-13417 Add the Locale::(for|to)LanguageTag() functions.
Fredrik Roubert [Thu, 13 Sep 2018 03:41:53 +0000 (20:41 -0700)]
ICU-13417 Add the Locale::(for|to)LanguageTag() functions.

They are C++ wrappers of uloc_forLanguageTag() and uloc_toLanguageTag()
respectively, that take care of dynamic memory management.

6 years agoICU-11276 Adding placeholder implementation and more API functions.
Shane Carr [Wed, 29 Aug 2018 03:34:41 +0000 (20:34 -0700)]
ICU-11276 Adding placeholder implementation and more API functions.

6 years agoICU-13417 Add the internal helper class CharStringByteSink.
Fredrik Roubert [Thu, 13 Sep 2018 03:40:14 +0000 (20:40 -0700)]
ICU-13417 Add the internal helper class CharStringByteSink.

This is an implementation of the public ICU ByteSink interface that
writes to the ICU internal class CharString.

6 years agoICU-11276 Adding initial Java NumberRangeFormatter boilerplate.
Shane Carr [Wed, 29 Aug 2018 02:50:55 +0000 (19:50 -0700)]
ICU-11276 Adding initial Java NumberRangeFormatter boilerplate.

6 years agoICU-20116 remove @deprecated from Edits.Iterator.toString() (#98)
Markus Scherer [Thu, 13 Sep 2018 03:11:26 +0000 (20:11 -0700)]
ICU-20116 remove @deprecated from Edits.Iterator.toString() (#98)

but keep @internal

6 years agoICU-12973 CLDR Japanese Era data and tentative Japanese new era support (#111)
Yoshito Umaoka [Wed, 12 Sep 2018 21:13:30 +0000 (17:13 -0400)]
ICU-12973 CLDR Japanese Era data and tentative Japanese new era support (#111)

* Updated era data format in supplementalData.

* Include tentative era names in data. Implemented Japanese era loaded from CLDR data in ICU4J.

* ICU4C implementation, ICU4C refactoring. WIP.

* VS project updates and some bug fixes

Also added API comments.

* Review feedback and bug fixes

- NULL to nullptr
- use of LocalUResourceBundlePointer
- TYPO "name" to "named"
- env var checking stricmp() == 0

* API comment correction based on feedback

* Duplicate the comment in ucal.h to calendar.h

* Fixed spelling errors in API comment

6 years agoICU-13812 Define U_FALLTHROUGH for GCC 7+ for ICU4C. (#100)
Jeff Genovy [Wed, 12 Sep 2018 17:17:35 +0000 (10:17 -0700)]
ICU-13812 Define U_FALLTHROUGH for GCC 7+ for ICU4C. (#100)

Currently U_FALLTHROUGH is not defined for GCC, meaning that any switch case statements with fall-throughs will generate warnings when building ICU4C.

In GCC 7, they added support for: "_attribute_((fallthrough))" which we can now use for U_FALLTHROUGH, which eliminates many warnings when building with GCC.

6 years agoICU-13687 ICU4C Enable Windows UWP version to use TZ update/override files. (#31)
Jeff Genovy [Tue, 11 Sep 2018 16:42:49 +0000 (09:42 -0700)]
ICU-13687 ICU4C Enable Windows UWP version to use TZ update/override files. (#31)

Enable the Windows UWP version of ICU4C to use TZ update/override files (.res files) for out-of-band timezone data updates. Also use the *W version of the Windows APIs to avoid code-page conversion.

6 years agoICU-20098 Fix BCP47 validity check for extlang and privateuse singleton (#102)
jungshik [Tue, 11 Sep 2018 06:45:14 +0000 (23:45 -0700)]
ICU-20098 Fix BCP47 validity check for extlang and privateuse singleton (#102)

* ICU-20098 Fix the validty check for extlang in uloc_forLanguageTag

BCP 47 has the following for language. extlang subtag can only be
preceded by 2*3ALPHA. Add a check for the length of language subtag
before extlang subtag.

language      = 2*3ALPHA            ; shortest ISO 639 code
                 ["-" extlang]       ; sometimes followed by
                                     ; extended language subtags
               / 4ALPHA              ; or reserved for future use
               / 5*8ALPHA            ; or registered language subtag

 extlang       = 3ALPHA              ; selected ISO 639 codes
                 *2("-" 3ALPHA)      ; permanently reserved}}

With this change, 'hant-cmn-CN' would drop '-cmn-CN' keeping only
'hant'.

* ICU-20098 Fix the validty check for extlang for ICU4J

* ICU-20098 Fix the compiler failure for ICU4J

* ICU-20098 Fix a compile error and test.

* ICU-20098 Add a test for invalid private use  singleton

ICU4C's check for private use singleton subtag ('x') is wrong and
treats invalid language tags as valid.

ICU4J's check is correct and does not require any change.

Fix that and add tests to both ICU4C and ICU4J.

6 years agoICU-12979 Fix \Q...\E in UnicodeRegex#transform (#23)
David Corbett [Mon, 10 Sep 2018 22:19:10 +0000 (18:19 -0400)]
ICU-12979 Fix \Q...\E in UnicodeRegex#transform (#23)

6 years agoICU-13754 Add a ListFormatter FieldPositionIterator format method (#109)
Frank Tang [Mon, 10 Sep 2018 02:14:16 +0000 (19:14 -0700)]
ICU-13754 Add a ListFormatter FieldPositionIterator format method (#109)

ICU-13754 Reapply PR#106 after sffc rewinding master it.