Index: pkg/http/lib/src/utils.dart |
diff --git a/pkg/http/lib/src/utils.dart b/pkg/http/lib/src/utils.dart |
index d99b9be2614a4406ea11cf640b53280e0e4ed0f2..ba5c968868fc45581ff43804eee4ad12f5d4d12e 100644 |
--- a/pkg/http/lib/src/utils.dart |
+++ b/pkg/http/lib/src/utils.dart |
@@ -95,13 +95,13 @@ Encoding requiredEncodingForCharset(String charset) { |
/// Converts [bytes] into a [String] according to [encoding]. |
String decodeString(List<int> bytes, Encoding encoding) { |
// TODO(nweiz): implement this once issue 6284 is fixed. |
Bob Nystrom
2013/05/16 16:11:39
How about throwing NotImplementedError if [encodin
nweiz
2013/05/16 18:32:46
I suspect most of the time when encodings get set
|
- return new String.fromCharCodes(bytes); |
+ return decodeUtf8(bytes); |
} |
/// Converts [string] into a byte array according to [encoding]. |
List<int> encodeString(String string, Encoding encoding) { |
// TODO(nweiz): implement this once issue 6284 is fixed. |
Bob Nystrom
2013/05/16 16:11:39
Ditto.
|
- return string.codeUnits; |
+ return encodeUtf8(string); |
} |
/// A regular expression that matches strings that are composed entirely of |