commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-1184) StringUtils#normalizeSpace no longer normalizes unicode non-breaking spaces (\u00A0) and does not trim control chars at the end any more
Date Sun, 17 Jan 2016 04:42:39 GMT

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

ASF GitHub Bot commented on LANG-1184:
--------------------------------------

Github user garydgregory commented on the pull request:

    https://github.com/apache/commons-lang/pull/113#issuecomment-172291572
  
    Thank you for your interest in [lang].
    
    Java says a non-breaking whitespace is not a whitespace:
    
    ```java
    Character.isWhitespace('\u00A0'));
    ```
    
    returns `false`.
    
    So I am not sure this patch is valid.



> StringUtils#normalizeSpace no longer normalizes unicode non-breaking spaces (\u00A0)
and does not trim control chars at the end any more
> ----------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LANG-1184
>                 URL: https://issues.apache.org/jira/browse/LANG-1184
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 3.4
>            Reporter: Pascal Schumacher
>
> These work with 3.3.2, but fail with 3.4
> {code:java}assertEquals("a b", StringUtils.normalizeSpace("a\u00A0 b"));{code}
> {code:java}assertEquals("b", StringUtils.normalizeSpace("b\u0000"));{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message