jerryscript icon indicating copy to clipboard operation
jerryscript copied to clipboard

Inconsistent behavior

Open Georgezxh opened this issue 2 years ago • 2 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

Georgezxh avatar Apr 27 '23 12:04 Georgezxh

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.

matetokodi avatar Jun 28 '23 14:06 matetokodi

Adding an icu would increase the library size too much.

zherczeg avatar Jul 18 '23 04:07 zherczeg