commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruno P. Kinoshita (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (VALIDATOR-433) BigDecimalValidator does not validate "()" negative currency uniformly for all locales
Date Tue, 21 Nov 2017 08:25:00 GMT

    [ https://issues.apache.org/jira/browse/VALIDATOR-433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16260414#comment-16260414
] 

Bruno P. Kinoshita commented on VALIDATOR-433:
----------------------------------------------

Here's the output:

{noformat}
-¤ ---	
د.إ.‏ ----	Arabic (United Arab Emirates)
د.أ.‏ ----	Arabic (Jordan)
ل.س.‏ ----	Arabic (Syria)
-Kn ---	Croatian (Croatia)
---- €	French (Belgium)
(B---)	Spanish (Panama)
-€---	Maltese (Malta)
Bs.F. ----	Spanish (Venezuela)
-¤ ---	Bulgarian
-NT$---	Chinese (Taiwan)
-¤ ---	Italian
-¤ ---	Korean
-¤ ---	Ukrainian
-¤ ---	Latvian
kr ----	Danish (Denmark)
($---)	Spanish (Puerto Rico)
---- đ	Vietnamese (Vietnam)
($---)	English (United States)
-€ ---	Serbian (Montenegro)
---- kr	Swedish (Sweden)
(B$---)	Spanish (Bolivia)
-$---	English (Singapore)
د.ب.‏ ----	Arabic (Bahrain)
-¤ ---	Portuguese
ر.س.‏ ----	Arabic (Saudi Arabia)
-¤ ---	Slovak
ر.ي.‏ ----	Arabic (Yemen)
-रू ---	Hindi (India)
-¤ ---	Irish
-€---	English (Malta)
---- €	Finnish (Finland)
-¤ ---	Estonian
-¤ ---	Swedish
-¤ ---	Czech
-KM ---	Serbian (Latin,Bosnia and Herzegovina)
-¤ ---	Greek
---- грн.	Ukrainian (Ukraine)
-¤ ---	Hungarian
SFr.----	French (Switzerland)
-¤---	Indonesian
$----	Spanish (Argentina)
ج.م.‏ ----	Arabic (Egypt)
-¥---	Japanese (Japan,JP)
(C---)	Spanish (El Salvador)
-R$ ---	Portuguese (Brazil)
-¤ ---	Belarusian
---- kr.	Icelandic (Iceland)
---- Kč	Czech (Czech Republic)
(¤---)	Spanish
---- zł	Polish (Poland)
---- ¤	Turkish
-€ ---	Catalan (Spain)
-CSD ---	Serbian (Serbia and Montenegro)
(RM---)	Malay (Malaysia)
-¤ ---	Croatian
-¤ ---	Lithuanian
---- €	Spanish (Spain)
($---)	Spanish (Colombia)
-лв.---	Bulgarian (Bulgaria)
-¤ ---	Albanian
---- ¤	French
-¤ ---	Japanese
-КМ. ---	Serbian (Bosnia and Herzegovina)
-¤ ---	Icelandic
(G---)	Spanish (Paraguay)
-¤ ---	German
$----	Spanish (Ecuador)
(US$---)	Spanish (United States)
ج.س.‏ ----	Arabic (Sudan)
-¤---	English
---- LEI	Romanian (Romania)
(Php---)	English (Philippines)
-¤ ---	Catalan
د.ت.‏ ----	Arabic (Tunisia)
-€ ---	Serbian (Latin,Montenegro)
(Q---)	Spanish (Guatemala)
-¤ ---	Slovenian
-₩---	Korean (South Korea)
-€---	Greek (Cyprus)
-$---	Spanish (Mexico)
---- руб.	Russian (Russia)
(L---)	Spanish (Honduras)
(HK$---)	Chinese (Hong Kong)
kr ----	Norwegian (Norway,Nynorsk)
---- Ft	Hungarian (Hungary)
฿----	Thai (Thailand)
د.ع.‏ ----	Arabic (Iraq)
Ch$----	Spanish (Chile)
-¤ ---	Finnish
د.م.‏ ----	Arabic (Morocco)
-€---	Irish (Ireland)
-¤ ---	Macedonian
---- TL	Turkish (Turkey)
---- €	Estonian (Estonia)
ر.ق.‏ ----	Arabic (Qatar)
-¤ ---	Serbian (Latin)
---- €	Portuguese (Portugal)
---- €	French (Luxembourg)
ر.ع.‏ ----	Arabic (Oman)
-¤ ---	Thai
-Lek---	Albanian (Albania)
(RD$---)	Spanish (Dominican Republic)
(CU$---)	Spanish (Cuba)
¤ ----	Arabic
-¤ ---	Russian
-$---	English (New Zealand)
-дин. ---	Serbian (Serbia)
SFr.----	German (Switzerland)
(NU$---)	Spanish (Uruguay)
-¤ ---	Malay
---- €	Greek (Greece)
---- ש"ח	Hebrew (Israel)
R----	English (South Africa)
฿----	Thai (Thailand,TH)
-¤ ---	Hindi
---- €	French (France)
-€ ---	German (Austria)
-¤ ---	Dutch
kr ----	Norwegian (Norway)
-$---	English (Australia)
-¤ ---	Vietnamese
€ ----	Dutch (Netherlands)
(---$)	French (Canada)
---- €	Latvian (Latvia)
---- €	German (Luxembourg)
(C---)	Spanish (Costa Rica)
د.ك.‏ ----	Arabic (Kuwait)
-¤ ---	Serbian
د.ل.‏ ----	Arabic (Libya)
-¤ ---	Maltese
SFr.----	Italian (Switzerland)
-¤ ---	Danish
---- €	German (Germany)
د.ج.‏ ----	Arabic (Algeria)
---- €	Slovak (Slovakia)
---- €	Lithuanian (Lithuania)
-€ ---	Italian (Italy)
-€---	English (Ireland)
-S$---	Chinese (Singapore)
-¤ ---	Romanian
-$---	English (Canada)
---- €	Dutch (Belgium)
-¤ ---	Norwegian
-¤ ---	Polish
-¥---	Chinese (China)
-¥---	Japanese (Japan)
-€ ---	German (Greece)
-din. ---	Serbian (Latin,Serbia)
-¤ ---	Hebrew
-Rs.---	English (India)
ل.ل.‏ ----	Arabic (Lebanon)
($C---)	Spanish (Nicaragua)
-¤ ---	Chinese
-Den ---	Macedonian (Macedonia)
-Руб---	Belarusian (Belarus)
-€ ---	Slovenian (Slovenia)
S/.----	Spanish (Peru)
-Rp---	Indonesian (Indonesia)
-£---	English (United Kingdom)

{noformat}

> BigDecimalValidator does not validate "()" negative currency uniformly for all locales
> --------------------------------------------------------------------------------------
>
>                 Key: VALIDATOR-433
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-433
>             Project: Commons Validator
>          Issue Type: Bug
>          Components: Routines
>    Affects Versions: 1.6
>         Environment: Windows 10, Tomcat 6, Java 8
>            Reporter: John DiPirro
>            Priority: Critical
>         Attachments: CurrencyValidatorTest.java, junitResults.jpg, screenshot-1.png
>
>
> Hi, 
> The following tests fail: 
> final String JAPAN_YEN = (new DecimalFormatSymbols(Locale.JAPAN)).getCurrencySymbol();

> final String CHINA_YEN = (new DecimalFormatSymbols(Locale.CHINA)).getCurrencySymbol();

> BigDecimal negative = new BigDecimal("-1234.56"); 
> assertEquals("Japan negative", negative, validator.validate("(" + JAPAN_YEN + "1,234.56)",
Locale.CHINA)); 
> assertEquals("China negative", negative, validator.validate("(" + CHINA_YEN + "1,234.56)",
Locale.CHINA)); 
> Please not that this test do not fail for other locales (US AND UK, for example). 
> Please advise on whether this is an issue, if there is a workaround, etc... 
> Regards, 
> John DiPirro



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message