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

Gary D. Gregory edited comment on LANG-1729 at 12/16/25 12:29 PM:
------------------------------------------------------------------

The JDK ticket https://bugs.openjdk.org/browse/JDK-8326627
   
says:
 
bq. From 
https://docs.oracle.com/javase%2F9%2Fdocs%2Fapi%2F%2F/java/lang/Float.html#valueOf-java.lang.String-,
 https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.2, and 
https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-Digits, 
fullwidth Unicode digits are not applicable. Moved to JDK as an enhancement.


was (Author: garydgregory):
The JDK ticket https://bugs.openjdk.org/browse/JDK-8326627
   
says:
 
bq. From 
https://docs.oracle.com/javase%2F9%2Fdocs%2Fapi%2F%2F/java/lang/Float.html#valueOf-java.lang.String-,
bq. https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.10.2, 
and https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-Digits,
bq.  fullwidth Unicode digits are not applicable. Moved to JDK as an 
enhancement.
bq. 

> 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)

Reply via email to