[ 
https://issues.apache.org/jira/browse/NUTCH-1813?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sebastian Nagel resolved NUTCH-1813.
------------------------------------
    Resolution: Won't Fix

Closing this issue as "won't fix" - the properties file "default.properties" 
defines the encoding of Java source files as UTF-8. A search for Java source 
files including non-ASCII characters ({{{}git grep -P '\P\{Ascii}' 
**.java{}}}), shows that they're widely used in the Nutch source code. Using 
escapes makes the code less readable. Thanks anyway!

> Use \u.... escapes for non-ASCII chars in TestURLUtil
> -----------------------------------------------------
>
>                 Key: NUTCH-1813
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1813
>             Project: Nutch
>          Issue Type: Bug
>    Affects Versions: 2.3
>         Environment: java version "1.7.0_51"
> Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
> Mac OSX 10.9.4, MacBookPro 64 Bit.
>            Reporter: Valerio Schiavoni
>            Priority: Major
>         Attachments: NUTCH-1813-2x-v1.patch, NUTCH-1813-trunk-v1.patch
>
>
> To reproduce, git clone the latest 2.x branch and execute the TestURLUtil 
> tests.
> There are 4 test failures and 1 error.
> Failing tests:
> testToUNICODE:org.junit.ComparisonFailure: expected:<http://www.[��]evir.com> 
> but was:<http://www.[ç]evir.com>
>       at org.junit.Assert.assertEquals(Assert.java:115)
>       at org.junit.Assert.assertEquals(Assert.java:144)
>       at org.apache.nutch.util.TestURLUtil.testToUNICODE(TestURLUtil.java:263)
> testChooseRepr:org.junit.ComparisonFailure: expected:<http://www.[b].com> but 
> was:<http://www.[a].com>
>       at org.junit.Assert.assertEquals(Assert.java:115)
>       at org.junit.Assert.assertEquals(Assert.java:144)
>       at 
> org.apache.nutch.util.TestURLUtil.testChooseRepr(TestURLUtil.java:179)
> testGetDomainName:
> org.junit.ComparisonFailure: expected:<[apache.]org> but was:<[]org>
>       at org.junit.Assert.assertEquals(Assert.java:115)
>       at org.junit.Assert.assertEquals(Assert.java:144)
>       at 
> org.apache.nutch.util.TestURLUtil.testGetDomainName(TestURLUtil.java:35)
> testToASCII:
> java.lang.AssertionError: expected:<http://www.xn--evir-zoa.com> but 
> was:<null>
>       at org.junit.Assert.fail(Assert.java:88)
>       at org.junit.Assert.failNotEquals(Assert.java:743)
>       at org.junit.Assert.assertEquals(Assert.java:118)
>       at org.junit.Assert.assertEquals(Assert.java:144)
>       at org.apache.nutch.util.TestURLUtil.testToASCII(TestURLUtil.java:273)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to