The regular expression /\s\xa0/ is used to recognize white spaces in
goog.string#trim and other functions.
But this expression doesn't match to many white space defined in ECMAScript 5th
in IE. For example, \u00A0, \u3000, \u2028, \u2029...
I want goog.string to match all white spaces defined in ECMAScript 5th. Because
my language environment(Japanese) uses double-space(\u3000) so frequently.
> What steps will reproduce the problem?
goog.string.trim('\u3000a b c');
> What is the expected output? What do you see instead?
Expected is 'a b c' but output ' a b c'.
> What version of the product are you using? On what operating system?
OS: Windows7 Enterprise 64bit
Browser: Internet Explorer 8
> Please provide any additional information below.
I wrote a patch to resolve this problem.
Defined some characters and regular expressions based on ECMAScript 5th. And
replaced \s\xa0 to this regexp.
I referenced these data.
http://www.ecma-international.org/publications/standards/Ecma-262.htm (at 7.2
and 7.3)
http://www.unicode.org/Public/6.0.0/ucd/PropList.txt
thank you.
Original issue reported on code.google.com by lv.wh...@gmail.com on 24 Dec 2010 at 11:16
Original issue reported on code.google.com by
lv.wh...@gmail.com
on 24 Dec 2010 at 11:16Attachments: