/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* * *Date:15July2002 *SUMMARY:Testingidentifierswithdouble-bytenames *Seehttp://bugzilla.mozilla.org/show_bug.cgi?id=58274 * *Hereisasampleoftheproblem: * *js>functionf\u02B1(){} * *js>f\u02B1.toSource(); *functionf¦(){} * *js>f\u02B1.toSource().toSource(); *(newString("functionf\xB1(){}")) * * *Seehowthehigh-byteinformation(the02)hasbeenlost? *ThesamethingwashappeningwiththetoString()method: * *js>f\u02B1.toString(); * *functionf¦(){ *} * *js>f\u02B1.toString().toSource(); *(newString("\nfunctionf\xB1(){\n}\n")) *
*/ //----------------------------------------------------------------------------- var UBound = 0; var BUGNUMBER = 58274; var summary = 'Testing identifiers with double-byte names'; var status = ''; var statusitems = []; var actual = ''; var actualvalues = []; var expect= ''; var expectedvalues = [];
/* *Defineafunctionthatusesdouble-byteidentifiersin *"everypossibleway" * *Thenrecovereachdouble-byteidentifierviaf.toString(). *Tomakethiseasier,puta'Z'tokenbeforeeveryone. * *Ourevalstringwillbe: * *sEval="functionZ\u02b1(Z\u02b2,b){ *try{Z\u02b3:varZ\u02b4=Z\u02b1;} *catch(Z\u02b5){for(varZ\u02b6inZ\u02b5) *{for(1;1<0;Z\u02b7++){newArray()[Z\u02b6]=1;}};}}"; * *Itwillbehelpfultobuildthisstringinstages:
*/ var s0 = 'function Z'; var s1 = '\u02b1(Z'; var s2 = '\u02b2, b) {try { Z'; var s3 = '\u02b3 : var Z'; var s4 = '\u02b4 = Z'; var s5 = '\u02b1; } catch (Z' var s6 = '\u02b5) { for (var Z'; var s7 = '\u02b6 in Z'; var s8 = '\u02b5){for (1; 1<0; Z'; var s9 = '\u02b7++) {new Array()[Z'; var s10 = '\u02b6] = 1;} };} }';
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.