From e2e8794d64d5c7e299cd6f6c509da9b15e4b9fdc Mon Sep 17 00:00:00 2001 From: srowen Date: Fri, 12 Aug 2011 17:29:41 +0000 Subject: [PATCH] Use UTF-8 not UTF8 in C# (Issue 936) git-svn-id: https://zxing.googlecode.com/svn/trunk@1881 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- csharp/client/result/optional/NDEFTextResultParser.cs | 4 ++-- csharp/client/result/optional/NDEFURIResultParser.cs | 4 ++-- csharp/qrcode/decoder/DecodedBitStreamParser.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/csharp/client/result/optional/NDEFTextResultParser.cs b/csharp/client/result/optional/NDEFTextResultParser.cs index e38363b8a..cb792b5be 100755 --- a/csharp/client/result/optional/NDEFTextResultParser.cs +++ b/csharp/client/result/optional/NDEFTextResultParser.cs @@ -57,9 +57,9 @@ namespace com.google.zxing.client.result.optional int languageLength = statusByte & 0x1F; // language is always ASCII-encoded: System.String language = bytesToString(payload, 1, languageLength, "US-ASCII"); - System.String encoding = isUTF16?"UTF-16":"UTF8"; + System.String encoding = isUTF16?"UTF-16":"UTF-8"; System.String text = bytesToString(payload, 1 + languageLength, payload.Length - languageLength - 1, encoding); return new System.String[]{language, text}; } } -} \ No newline at end of file +} diff --git a/csharp/client/result/optional/NDEFURIResultParser.cs b/csharp/client/result/optional/NDEFURIResultParser.cs index fabab7d45..ad0fe5596 100755 --- a/csharp/client/result/optional/NDEFURIResultParser.cs +++ b/csharp/client/result/optional/NDEFURIResultParser.cs @@ -61,8 +61,8 @@ namespace com.google.zxing.client.result.optional { prefix = URI_PREFIXES[identifierCode]; } - System.String restOfURI = bytesToString(payload, 1, payload.Length - 1, "UTF8"); + System.String restOfURI = bytesToString(payload, 1, payload.Length - 1, "UTF-8"); return prefix == null?restOfURI:prefix + restOfURI; } } -} \ No newline at end of file +} diff --git a/csharp/qrcode/decoder/DecodedBitStreamParser.cs b/csharp/qrcode/decoder/DecodedBitStreamParser.cs index e2c2fec3d..71ad4edd5 100755 --- a/csharp/qrcode/decoder/DecodedBitStreamParser.cs +++ b/csharp/qrcode/decoder/DecodedBitStreamParser.cs @@ -40,7 +40,7 @@ namespace com.google.zxing.qrcode.decoder private const System.String SHIFT_JIS = "SJIS"; private const System.String EUC_JP = "EUC_JP"; private static bool ASSUME_SHIFT_JIS; - private const System.String UTF8 = "UTF8"; + private const System.String UTF8 = "UTF-8"; // Redivivus.in Java to c# Porting update // 30/01/2010 // Commented & Added @@ -434,4 +434,4 @@ namespace com.google.zxing.qrcode.decoder } } } -} \ No newline at end of file +}