jerryscript-project / jerryscript

Ultra-lightweight JavaScript engine for the Internet of Things.

Home Page:https://jerryscript.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inconsistent behavior

Georgezxh opened this issue · comments

Description

Other js engines can print correctly while jerry throws a type error.

JerryScript revision

2.4.0

Build platform

ubuntu20.04

Test case

result = String.prototype.normalize.call(String.prototype.padStart.call(0, 5, '-'));
print(result);

Output

Unhandled exception: TypeError

Expected behavior

----0

Currently String.prototype.normalize is not implemented because it would require the use of libICU or a similar library for proper unicode and locale support, which would increase the size of the jerryscript binary substantially, and as such it will not be done.

Adding an icu would increase the library size too much.