-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Description
A test shown that Handlebar.js fails to handle unicode keys [1]. (Mustache.js works fine.) Chinese, Japanese, arabic, indian, korean characters are concerned. A Stackoverflow answer[3] noticed that Handlebars source use regexes like [a-zA-Z]+ and [a-zA-Z0-9_$-]+/[=}\s/.] to drive the keys parsing. It is suspect that this rather limited a-zA-Z components are behind your trouble.
Question: which regex should be used ? Can someone check and submit a codefix ?
[1]: http://jsfiddle.net/YqhKG/2/ -- handlebar test: fail.
[2]: -- mustache.js test: works fine.
[3] http://stackoverflow.com/questions/14661526/handlebars-js-doesnt-handle-unicode-as-jsons-key