diff options
Diffstat (limited to 'Libraries/LibWeb/Bindings/WindowObject.cpp')
-rw-r--r-- | Libraries/LibWeb/Bindings/WindowObject.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Libraries/LibWeb/Bindings/WindowObject.cpp b/Libraries/LibWeb/Bindings/WindowObject.cpp index 26b6ba1311..44f424c6ec 100644 --- a/Libraries/LibWeb/Bindings/WindowObject.cpp +++ b/Libraries/LibWeb/Bindings/WindowObject.cpp @@ -283,7 +283,9 @@ JS_DEFINE_NATIVE_FUNCTION(WindowObject::atob) auto decoded = decode_base64(StringView(string)); // decode_base64() returns a byte string. LibJS uses UTF-8 for strings. Use Latin1Decoder to convert bytes 128-255 to UTF-8. - return JS::js_string(vm, TextCodec::decoder_for("iso-8859-1")->to_utf8(decoded)); + auto decoder = TextCodec::decoder_for("windows-1252"); + ASSERT(decoder); + return JS::js_string(vm, decoder->to_utf8(decoded)); } JS_DEFINE_NATIVE_FUNCTION(WindowObject::btoa) |