Use UTF-8 not UTF8 in C# (Issue 936)

git-svn-id: https://zxing.googlecode.com/svn/trunk@1881 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen 2011-08-12 17:29:41 +00:00
parent 6c87ea3ee6
commit e2e8794d64
3 changed files with 6 additions and 6 deletions

View file

@ -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};
}
}
}
}

View file

@ -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;
}
}
}
}

View file

@ -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
}
}
}
}
}