Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #19608
| Message-ID | <2151128.Fu5VX4rOnI@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2013-05-03 17:59 +0200 |
| Subject | Re: Unicode support |
| Newsgroups | comp.lang.javascript |
| References | (17 earlier) <2239420.ujkpEq8jF8@PointedEars.de> <kjc1nv$4q4$1@speranza.aioe.org> <1888759.kj0EFmyP97@PointedEars.de> <6941585.Q3jqcEWICf@PointedEars.de> <f1a58a20-3769-4162-96c1-208497fd3202@s18g2000yqg.googlegroups.com> |
Scott Sauyet wrote: > Thomas 'PointedEars' Lahn wrote: >> JSX:string/unicode.js is real: I have been working on a library that >> supports Unicode characters beyond the Basic Multilingual Plane; that is >> UTF-16 code sequences for code points beyond U+FFFF, up to U+10FFFF. >> [ ... ] >> >> The unit test of JSX:string/unicode.js can now be viewed at >> >> <http://PointedEars.de/scripts/test/unicode> >> >> More features and testcases will follow. Hopefully the library will be >> useful. >> >> I am also considering to overwrite built-in methods of the String >> constructor and the String prototype object, and augment them with new >> ones […]. Overwriting and augmenting would be optional each, but done by >> default, through the new jsx.options mechanism (see object.js [2] for >> details). >> >> What do you think? [ ... ] > > While I have no current uses for this, I applaud your efforts, and > would be very happy to know that it was available if I did need it. > I've looked over your regex extension; I was impressed and wished it > had been available for some older projects I had done. This project > could clearly fill some similar gaps. > > But, as I said, I have no uses for it in any current projects. > > Good luck, Thank you very much. Now unicode.js by default (AISB, it is configurable) also replaces String.fromCharCode() to support code points beyond U+FFFF (Number arguments from 0 to 0x10FFFF), and adds String.prototype.getLength() so that "…".getLength() returns the number of Unicode characters in a string, as opposed to the built-in "…".length which yields the number of 16-bit code units. More is going to follow. Thanks to Cezary Tomczyk's test [1] it is also working in IE 10 on Windows 8 (it was a refactoring bug in object.js). However, JScript in IE/MSHTML 10 apparently lacks the ability to define getters and setters for properties of native objects as specified in ECMAScript Edition 5.x, so tests using those features will always fail. [1] <https://twitter.com/cezarytomczyk/status/329850349760442368> -- PointedEars Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Unicode support Christoph Becker <cmbecker69@gmx.de> - 2013-04-01 15:24 +0200
Re: Unicode support Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-04-01 18:39 +0200
Re: Unicode support Mike Duffy <Use.web.form@website_in_sig.com> - 2013-04-01 20:36 +0000
Re: Unicode support Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-04-30 23:03 +0200
Re: Unicode support Scott Sauyet <scott.sauyet@gmail.com> - 2013-05-02 05:27 -0700
Re: Unicode support Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2013-05-03 17:59 +0200
csiph-web