[
https://issues.apache.org/jira/browse/LANG-1729?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gary D. Gregory reopened LANG-1729:
-----------------------------------
> NumberUtils.isParsable() returns true for Fullwidth Unicode digits
> ------------------------------------------------------------------
>
> Key: LANG-1729
> URL: https://issues.apache.org/jira/browse/LANG-1729
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.math.*
> Affects Versions: 3.14.0
> Reporter: Andrei Anischevici
> Priority: Major
>
> *NumberUtils.isParsable()* returns *true* for Fullwidth Unicode digits
> (U+FF10 to U+FF19, see
> [https://en.wikipedia.org/wiki/Halfwidth_and_Fullwidth_Forms_(Unicode_block)]),
> even though these cannot be parsed by *Double.parseDouble()* and
> {*}Float.parseFloat(){*}, asĀ {*}NumberFormatException{*}s are thrown when
> trying to parse these.
> I've also opened a JDK bug, see
> [https://bugs.java.com/bugdatabase/view_bug?bug_id=JDK-8326627] and
> [https://bugs.openjdk.org/projects/JDK/issues/JDK-8326627]
> Since the underlying issue is that *Character.isDigit()* returns *true* for
> fullwidth digits and until this is fixed in the JDK, it would be great to fix
> this in *NumberUtils.isParsable()* so that it would return *false* for
> Fullwidth Unicode digits.
> Gist reproducing the issue:
> [https://gist.github.com/XDex/2e300189a07e8224524100f26b5f6b46]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)