Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #19608

Re: Unicode support

Path csiph.com!usenet.pasdenom.info!news.albasani.net!news2.arglkargh.de!noris.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail
Content-Type text/plain; charset="UTF-8"
Message-ID <2151128.Fu5VX4rOnI@PointedEars.de> (permalink)
From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Reply-To Thomas 'PointedEars' Lahn <usenet@PointedEars.de>
Organization PointedEars Software (PES)
Date Fri, 03 May 2013 17:59:30 +0200
User-Agent KNode/4.8.5
Content-Transfer-Encoding 8Bit
X-Face %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&.<b';Md8`dH6iqhT)6C^.Px|[=M@7=Ik[_w<%n1Up"LPQNu2m8|L!/3iby{-]A+#YE}Kl{Cw$\U!kD%K}\2jz"QQP6Uqr],./"?;=4v
Face iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg==
Subject Re: Unicode support
Newsgroups comp.lang.javascript
References <121c60da-4c3c-4ecd-bae8-5375132c19de@p5g2000yqj.googlegroups.com> <2206171.g8a4ScMWm9@PointedEars.de> <XnsA189B71C813AEdougmilmaccom@78.46.70.116> <kide60$df1$1@speranza.aioe.org> <XnsA189C3E70FCE8dougmilmaccom@78.46.70.116> <ar015sF2nu9U1@mid.uni-berlin.de> <1l036uh.tti447p1ww4uN%adrian@poppyrecords.invalid.invalid> <ar0svgF90ntU1@mid.uni-berlin.de> <1396959.N3YltuB2Mg@PointedEars.de> <kiga62$mn9$1@speranza.aioe.org> <2177849.7jHvAoTLnH@PointedEars.de> <kj6nf9$46c$1@speranza.aioe.org> <2391743.1T8NqQ3TJ8@PointedEars.de> <kj6t3n$e1r$1@news.albasani.net> <kj6uci$of0$1@speranza.aioe.org> <5795699.ZddputCnCo@PointedEars.de> <kj7ggc$f3o$1@speranza.aioe.org> <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>
MIME-Version 1.0
Lines 55
NNTP-Posting-Date 03 May 2013 17:59:31 CEST
NNTP-Posting-Host d58dc71b.newsspool3.arcor-online.net
X-Trace DXC=PEBanH<=_]h9kIfcjg:0fdMcF=Q^Z^V3h4Fo<]lROoRa8kF<OcfhCOkkVJJEDc\6YfDZm8W4\YJNlb@mF9jNikdeBoKGPB=12Ag8>OLN\gfA]`
X-Complaints-To usenet-abuse@arcor.de
Xref csiph.com comp.lang.javascript:19608

Show key headers only | View raw


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


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