You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2020/04/14 18:55:00 UTC
[couchdb] 04/04: Set UTF-8 encoding when compiling scripts
This is an automated email from the ASF dual-hosted git repository.
davisp pushed a commit to branch fix-couchjs-utf8-conversions
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 0767ebbd86991e4aea1ad61b4ef8f5fcaed70869
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Tue Apr 14 13:39:17 2020 -0500
Set UTF-8 encoding when compiling scripts
---
src/couch/priv/couch_js/60/main.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/couch/priv/couch_js/60/main.cpp b/src/couch/priv/couch_js/60/main.cpp
index b6157ed..db2157d 100644
--- a/src/couch/priv/couch_js/60/main.cpp
+++ b/src/couch/priv/couch_js/60/main.cpp
@@ -473,6 +473,7 @@ main(int argc, const char* argv[])
// Compile and run
JS::CompileOptions options(cx);
options.setFileAndLine(args->scripts[i], 1);
+ options.setUTF8(true);
JS::RootedScript script(cx);
if(!JS_CompileScript(cx, scriptsrc, slen, options, &script)) {