From: <yos...@us...> - 2012-10-03 20:22:27
|
The proposal below was approved by the ICU PMC on 2012-10-03 with one update. /** If nonzero, specifies that if setting the "max integer digits" attribute would truncate a value, return a format error rather than silently truncating. * For example, formatting "1234" with 4 max int digits would succeed, but "12345" would fail. No effect on parsing. * @draft ICU 50 */ UNUM_FORMAT_FAIL_IF_MAX_DIGITS, The name of enum was changed to UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS to avoid some confusion. Therefore, the final API signature will be - /** If nonzero, specifies that if setting the "max integer digits" attribute would truncate a value, return a format error rather than silently truncating. * For example, formatting "1234" with 4 max int digits would succeed, but "12345" would fail. No effect on parsing. * @draft ICU 50 */ UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS, Thanks, Yoshito From: "Steven R. Loomis" <sr...@ic...> To: icu...@li..., Date: 09/27/2012 10:07 PM Subject: [icu-design] #9592 C: Max Integer control, Exponent Case Sensitivity Control (updated) 9592: Decimal Format Max Integer Control, Case Sensitivity Control [pending] Steven Proposer: Steven I would like to propose the following API for: ICU 50 Please provide feedback by: next Wednesday, 2012-10-03 Designated API reviewer: Yoshito Ticket: http://bugs.icu-project.org/trac/ticket/9592 #1 Max Integer Control TODO: max digits: Find out current behavior (format, parse) x (C++, Java) and revisit Results: C and J: “1997” with max int digits 2 parses as “97”. Has no effect on formatting. #2 Case Sensitivity Control Affect all text. Parse only. unum.h: enum UNumberFormatAttribute { /** If nonzero, specifies that if setting the "max integer digits" attribute would truncate a value, return a format error rather than silently truncating. * For example, formatting "1234" with 4 max int digits would succeed, but "12345" would fail. No effect on parsing. * @draft ICU 50 */ UNUM_FORMAT_FAIL_IF_MAX_DIGITS, /** If nonzero, specifies that any text is parsed in a case-sensitive way. By default, some items, such as the exponent symbol, are parsed case-insensitive. * @draft ICU 50 */ UNUM_PARSE_CASE_SENSITIVE, } No special C++ API. See #9613 ------------------------------------------------------------------------------ Got visibility? Most devs has no idea what their production app looks like. Find out how fast your code is with AppDynamics Lite. http://ad.doubleclick.net/clk;262219671;13503038;y? http://info.appdynamics.com/FreeJavaPerformanceDownload.html _______________________________________________ icu-design mailing list icu...@li... To Un/Subscribe: https://lists.sourceforge.net/lists/listinfo/icu-design |