mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
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:
parent
6c87ea3ee6
commit
e2e8794d64
|
@ -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};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue