Author: pkosiorowski Date: Sun Aug 21 05:34:06 2005 New Revision: 234193 URL: http://svn.apache.org/viewcvs?rev=234193&view=rev Log: Fixed failing JUnit test on Windows.
Modified: lucene/nutch/trunk/src/plugin/languageidentifier/src/java/org/apache/nutch/analysis/lang/LanguageIdentifier.java lucene/nutch/trunk/src/plugin/languageidentifier/src/test/org/apache/nutch/analysis/lang/TestLanguageIdentifier.java Modified: lucene/nutch/trunk/src/plugin/languageidentifier/src/java/org/apache/nutch/analysis/lang/LanguageIdentifier.java URL: http://svn.apache.org/viewcvs/lucene/nutch/trunk/src/plugin/languageidentifier/src/java/org/apache/nutch/analysis/lang/LanguageIdentifier.java?rev=234193&r1=234192&r2=234193&view=diff ============================================================================== --- lucene/nutch/trunk/src/plugin/languageidentifier/src/java/org/apache/nutch/analysis/lang/LanguageIdentifier.java (original) +++ lucene/nutch/trunk/src/plugin/languageidentifier/src/java/org/apache/nutch/analysis/lang/LanguageIdentifier.java Sun Aug 21 05:34:06 2005 @@ -422,7 +422,7 @@ if (analyzeLength != 0) { len = Math.min(len, analyzeLength - text.length()); } - text.append(new String(buffer, 0, len)); + text.append(new String(buffer, 0, len, "UTF-8")); } return identify(text); } Modified: lucene/nutch/trunk/src/plugin/languageidentifier/src/test/org/apache/nutch/analysis/lang/TestLanguageIdentifier.java URL: http://svn.apache.org/viewcvs/lucene/nutch/trunk/src/plugin/languageidentifier/src/test/org/apache/nutch/analysis/lang/TestLanguageIdentifier.java?rev=234193&r1=234192&r2=234193&view=diff ============================================================================== --- lucene/nutch/trunk/src/plugin/languageidentifier/src/test/org/apache/nutch/analysis/lang/TestLanguageIdentifier.java (original) +++ lucene/nutch/trunk/src/plugin/languageidentifier/src/test/org/apache/nutch/analysis/lang/TestLanguageIdentifier.java Sun Aug 21 05:34:06 2005 @@ -219,7 +219,7 @@ // Then, each line of the file... BufferedReader testFile = new BufferedReader( new InputStreamReader( - this.getClass().getResourceAsStream(tokens[0]))); + this.getClass().getResourceAsStream(tokens[0]), "UTF-8")); String testLine = null; while((testLine = testFile.readLine()) != null) { testLine = testLine.trim();