You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by di...@apache.org on 2009/11/16 19:45:22 UTC

svn commit: r880906 - /incubator/lucene.net/trunk/C#/src/Test/Index/TestPayloads.cs

Author: digy
Date: Mon Nov 16 18:45:21 2009
New Revision: 880906

URL: http://svn.apache.org/viewvc?rev=880906&view=rev
Log: (empty)

Modified:
    incubator/lucene.net/trunk/C#/src/Test/Index/TestPayloads.cs

Modified: incubator/lucene.net/trunk/C#/src/Test/Index/TestPayloads.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Test/Index/TestPayloads.cs?rev=880906&r1=880905&r2=880906&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Test/Index/TestPayloads.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Test/Index/TestPayloads.cs Mon Nov 16 18:45:21 2009
@@ -665,13 +665,11 @@
 			{
 				lock (this)
 				{
-					System.String s = new System.String(System.Text.UTF8Encoding.UTF8.GetChars(bytes));
+                    System.String s = System.Text.Encoding.Default.GetString(bytes);
 					UnicodeUtil.UTF16toUTF8(s, 0, s.Length, utf8Result);
 					try
 					{
-						System.String tempStr;
-						tempStr = System.Text.Encoding.GetEncoding("UTF-8").GetString(utf8Result.result);
-						return new System.String(tempStr.ToCharArray(), 0, utf8Result.length);
+                        return System.Text.Encoding.UTF8.GetString(utf8Result.result, 0, utf8Result.length);
 					}
 					catch (System.IO.IOException uee)
 					{