Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #19545
| Message-ID | <6941585.Q3jqcEWICf@PointedEars.de> (permalink) |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Organization | PointedEars Software (PES) |
| Date | 2013-04-30 23:03 +0200 |
| Subject | Re: Unicode support |
| Newsgroups | comp.lang.javascript |
| References | (17 earlier) <5795699.ZddputCnCo@PointedEars.de> <kj7ggc$f3o$1@speranza.aioe.org> <2239420.ujkpEq8jF8@PointedEars.de> <kjc1nv$4q4$1@speranza.aioe.org> <1888759.kj0EFmyP97@PointedEars.de> |
Thomas 'PointedEars' Lahn wrote:
> Christoph Becker wrote:
>> Thomas 'PointedEars' Lahn wrote:
>>> Christoph Becker wrote:
>>>> Anyway, I appreciate your working on a workaround; may come in handy.
>>>> :)
>>>
>>> At the latest after first contact ;-)
>>>
>>> You will find it in
>>>
>
<http://PointEdears.de/websvn/listing.php?repname=JSX&path=%2Ftrunk%2Fstring%2F>
>>> when it is ready for testing.
>>
>> My feedreader will keep an eye on it. ;)
>
> Thank you.
>
> Due to recent events I would also like to announce that in the version of
> unicode.js that follows this one there is going to be support for the
> Vulcan Unicode characters (both TGV and MGV) and the Sloof-lirpa script in
> which these languages are written. Stay tuned.
Now that April Fools' Day is long over, I would like to clarify so as not to
be misunderstood.
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.
A future unicode.js that would support the aforementioned Vulcan script
(writing) is _not_ going to happen (although I might write another script
[programming] that supports the Vulcan languages later – if Google can do
Klingon [1], I can do Vulcan ;-)).
Those were the clues (ROT-13 encoded for those who either like puzzles or
are not interested in the details of the joke):
- Gurer ner ab Ihypna Havpbqr punenpgref. (Gurer ner abg rira Xyvatba
rgp. Havpbqr punenpgref, nygubhtu gurer ner sbagf gung znc pbqr cbvagf gb
gubfr punenpgref. V pna cebivqr HEVf gb gubfr jub ner vagrerfgrq.)
- Gurer vf ab “Fybbs-yvecn” fpevcg; “Fybbs-yvecn”, jura ernq onpxjneqf, vf
“ncevy-sbbyF”.
[V qvq abg rkcrpg, ubjrire, “fybbs” gb or n erny Ratyvfu
jbeq. Nyfb, frireny bgure crbcyr hfrq “fybbs yvecn” va
gurve Ncevy Sbbyf' wbxr; cnegvphyneyl pheerag VFF Pbzznaqre
Puevf Unqsvryq (PFN-NFP):
<uggcf://gjvggre.pbz/Pzqe_Unqsvryq/fgnghf/318806874935939074>
Ol pbvapvqrapr, /yvecn/ vf gur anzr bs n gjb-oynqrq Ihypna jrncba
gung jnf hfrq va unaq-gb-unaq pbzong orsber gur Njnxravat, naq vf
fgvyy hfrq va gur evghny bs /xbba-hg-xny-vs-srr/ – zneevntr-be-
punyyratr[-gb-gur-qrngu).]
- Gur Ihypna ynathntrf ner jevggra jvgu n (abg shyyl xabja) fpevcg jurer
tylcuf fgnaq sbe flyynoyrf vafgrnq bs fvatyr punenpgref (zhpu yvxr Nfvna
ynathntrf). Genafxevcgvbaf hfr gur Yngva nycunorg. Frr nyfb Gur
Ihypna Ynathntr Vafgvghqr (Erpynzngvba Cebwrpg):
<uggc://jjj.fgbtrrx.pbz/jvxv/Pngrtbel:Ihypna_Ynathntr_Vafgvghgr>
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
(I already had several of them, some superfluous as it turned out, but I
removed them after extensive refactoring of jsx.string.unicode.WideString
broke them). 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? Would you find, say
/* returns 1 */
"𝄞".getLength()
in addition to
/* returns 1 */
jsx.string.unicode.WideString("𝄞").getLength()
and as opposed to
/* yields 2 */
"𝄞".length
useful? And would you find notations like
/* returns a WideString instance containing "𝄞" */
jsx.string.unicode.WideString("\\u{1D11E}")
and
/* returns a RegExp that matches "𝄞" */
jsx.regexp.RegExp("\\u{1D11E}")
useful until ECMAScript Edition 6 (”Harmony”) was formally published and
interoperably implemented? (See also [3].)
_________
[1] <http://www.google.com/?hl=xx-klingon>
[2]
<http://PointedEars.de/websvn/filedetails.php?repname=JSX&path=%2Ftrunk%2Fobject.js>
[3]
<http://wiki.ecmascript.org/doku.php?id=spec:chapter_6_lexical_structure>
--
PointedEars
Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next 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