Support Chinese characters
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/377 Reviewed By: passy Differential Revision: D14299674 Pulled By: danielbuechele fbshipit-source-id: 6b10370a4a367ae6e58415b8eeb5aef0864354f4
This commit is contained in:
committed by
Facebook Github Bot
parent
c098269533
commit
f4b2ce9a2b
@@ -62,7 +62,7 @@ function decodeBody(container: Request | Response): string {
|
||||
if (!container.data) {
|
||||
return '';
|
||||
}
|
||||
const b64Decoded = atob(container.data);
|
||||
const b64Decoded = decodeURIComponent(escape(atob(container.data)));
|
||||
|
||||
return getHeaderValue(container.headers, 'Content-Encoding') === 'gzip'
|
||||
? decompress(b64Decoded)
|
||||
|
||||
@@ -490,7 +490,7 @@ class SizeColumn extends PureComponent<{
|
||||
if (lengthString != null && lengthString != '') {
|
||||
length = parseInt(lengthString, 10);
|
||||
} else if (response.data) {
|
||||
length = atob(response.data).length;
|
||||
length = decodeURIComponent(escape(atob(response.data))).length;
|
||||
}
|
||||
return length;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user