diff options
Diffstat (limited to 'Lib/csharp/wchar.i')
-rw-r--r-- | Lib/csharp/wchar.i | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/csharp/wchar.i b/Lib/csharp/wchar.i index 2ada4df75..39b99ee22 100644 --- a/Lib/csharp/wchar.i +++ b/Lib/csharp/wchar.i @@ -49,8 +49,7 @@ static void * SWIG_csharp_wstring_callback(const wchar_t *s) { byte[] buffer = new byte[length * 4]; global::System.Runtime.InteropServices.Marshal.Copy(cString, buffer, 0, buffer.Length); - byte[] utf8buffer = global::System.Text.Encoding.Convert(global::System.Text.Encoding.UTF32, global::System.Text.Encoding.UTF8, buffer); - return global::System.Text.Encoding.Default.GetString(utf8buffer); + return global::System.Text.Encoding.UTF32.GetString(buffer); } static SWIGWStringHelper() { |