Skip to content

Commit eb632a6

Browse files
authored
Merge pull request #1509 from NativeScript/vmutafov/remove-ascii-usage
Remove usage of ASCII encoding
2 parents 2b992cb + c183738 commit eb632a6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test-app/app/src/debug/java/com/tns/ErrorReport.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static String getErrorMessage(Throwable ex) {
169169
ex.printStackTrace(ps);
170170

171171
try {
172-
content = baos.toString("US-ASCII");
172+
content = baos.toString("UTF-8");
173173
} catch (UnsupportedEncodingException e) {
174174
content = e.getMessage();
175175
}
@@ -423,4 +423,4 @@ public void onClick(View v) {
423423
return view;
424424
}
425425
}
426-
}
426+
}

test-app/runtime/src/main/java/com/tns/Runtime.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ public static String getStackTraceErrorMessage(Throwable ex) {
292292
ex.printStackTrace(ps);
293293

294294
try {
295-
content = baos.toString("US-ASCII");
295+
content = baos.toString("UTF-8");
296296
String jsStackTrace = Runtime.getJSStackTrace(ex);
297297
if (jsStackTrace != null) {
298298
content = getStackTraceOnly(content);

0 commit comments

Comments
 (0)