jerryscript: UTF-8 variable name error
When using UTF-8 variable name, the “jerry_parse” function will returns a value “1073429487”, wondering how to get it fixed?
var 测试 = "您好";
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (8 by maintainers)
Commits related to this issue
- Improve gen-unicode.py to support unicode ranges This patch fixes #2936 Co-authored-by: Gabor Loki loki@inf.u-szeged.hu JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu — committed to rerobika/jerryscript by deleted user 5 years ago
- Improve gen-unicode.py to support unicode ranges This patch fixes #2936 Co-authored-by: Gabor Loki loki@inf.u-szeged.hu JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu — committed to rerobika/jerryscript by deleted user 5 years ago
- Improve gen-unicode.py to support unicode ranges This patch fixes #2936 Co-authored-by: Gabor Loki loki@inf.u-szeged.hu JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu — committed to rerobika/jerryscript by deleted user 5 years ago
- Improve gen-unicode.py to support unicode ranges This patch fixes #2936 Co-authored-by: Gabor Loki loki@inf.u-szeged.hu JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu — committed to rerobika/jerryscript by deleted user 5 years ago
- Improve gen-unicode.py to support unicode ranges (#2944) This patch fixes #2936 Co-authored-by: Gabor Loki loki@inf.u-szeged.hu JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-sze... — committed to jerryscript-project/jerryscript by deleted user 5 years ago
@akosthekiss Thank you so much, your minial example works like a champ now… Hope the UTF-8 variable name issue would be fixed very soon too…
@weixiongmei The following minimal example works for me:
Its output is
Error: SyntaxError: Primary expression expected. [line: 1, column: 2]
.The
ret_value = jerry_get_value_from_error (ret_value, true);
line is an important difference compared to old code. The API around errors have changed somewhat (around #2350). See http://jerryscript.net/api-reference/#jerry_get_value_from_error . That may also affect your experience withprint_unhandled_exception
.Do take a look at main-unix.c. It is always a good starting example.