Index: pkg/http_server/lib/src/http_multipart_form_data_impl.dart |
diff --git a/pkg/http_server/lib/src/http_multipart_form_data_impl.dart b/pkg/http_server/lib/src/http_multipart_form_data_impl.dart |
index 8b313aa1bdc12da348712a04f7ea821dea849bb4..7956c0f0bb3400bacda1fac8db0170943f6ab30c 100644 |
--- a/pkg/http_server/lib/src/http_multipart_form_data_impl.dart |
+++ b/pkg/http_server/lib/src/http_multipart_form_data_impl.dart |
@@ -34,11 +34,11 @@ class _HttpMultipartFormData extends Stream implements HttpMultipartFormData { |
StringBuffer buffer = new StringBuffer(); |
Encoding encoding; |
if (contentType != null) { |
- encoding = Encoding.fromName(contentType.charset); |
+ encoding = Encoding.getByName(contentType.charset); |
} |
- if (encoding == null) encoding = Encoding.ISO_8859_1; |
+ if (encoding == null) encoding = LATIN1; |
_stream = _stream |
- .transform(new StringDecoder(encoding)) |
+ .transform(encoding.decoder) |
.expand((data) { |
buffer.write(data); |
var out = _decodeHttpEntityString(buffer.toString()); |