Skip to content
Tcl Source Code Artifact [0ce3136dc9]
Login

Artifact [0ce3136dc9]

Artifact 0ce3136dc980ed9e282fa2c4369d02c6487ad61e:

Ticket change [0ce3136dc9] - New ticket [3085390fffffffff|3085390fff] <i>Non-BMP characters folded back to BMP</i>. by lars_h on 2010-10-11 17:30:45.
D 2010-10-11T17:30:45
J assignee pvgoran
J cmimetype text/plain
J comment Checking\swhether\sa\sstring\sis\sa\svalid\sXML\sname\sis\sconveniently\sdone\susing\sa\sregexp,\salthough\sdoing\sthis\sby\sthe\sbook\sis\sslightly\scumbersome\sas\sthere\sare\srather\smany\scharacter\sranges\sto\sinclude\sin\sthe\scharacter\sranges.\sStill,\sthe\sother\sday\sI\sset\sout\sto\sdo\sit.\sOne\sof\sthe\scharacter\sranges\sis\sfrom\sU+10000\sto\sU+EFFFF,\si.e.,\sit\sconsists\sentirely\sof\scharacters\soutside\sthe\sBasic\sMultilingual\sPlane\sthat\sTcl\scurrently\sis\srestricted\sto.\sSince\sthe\sregexp\sengine\sprovides\sthe\s\\U<8\shex\sdigits>\ssyntax\sfor\sgoing\sbeyond\sthe\sBMP,\sI\sthought\sI\scould\sthrow\sin\sthis\s\\U00010000-\\U000EFFFF\srange\sas\swell\sfor\sForward\sCompatibility.\sUnfortunately,\sthis\sturned\sout\sto\snot\sbe\sthe\scase.\n\nWhat\sappears\sto\shappen\sis\sthat\san\s\\Uxxxxyyyy\sis\streated\sas\s\\uyyyy,\ssince\n\n%\sregexp\s{[\\U00010020]}\s"\s"\n1\n%\sregexp\s{\\U00010020}\s"\s"\n1\n%\sregexp\s{\\U00010020}\s!\n0\n%\sregexp\s{[\\U00010020-\\U00010022]}\s!\n1\n%\sregexp\s{[\\U00010020-\\U00020020]}\s!\n0\n\nWhat\sI\swould\sexpect\sto\shappen\sis\sthat\s\\U\ssequences\sfor\scharacters\soutside\sthe\sBMP\sare\ssimply\streated\sas\ssomething\swhich\sdoesn't\smatch\sany\sstring,\sbut\sI\sunderstand\sthat\sthis\sis\sa\sbit\sesoteric\sand\snot\sof\shigh\spriority.\sHowever,\sat\sthe\svery\sleast\sthere\sshould\sbe\stests\s(perhaps\swith\s"known\sbug"\sconstraints)\sthat\se.g.\s\\U00010020\sdoes\snot\smatch\s\\u0020.\sIf\sI\sunderstand\sreg.test\scorrectly,\sthere\scurrently\saren't\s*any*\stests\sof\s\\U\swhere\sthe\smatch\sshould\sfail.\n\n\n
J foundin obsolete:\s8.6b1
J is_private 0
J priority 5\sMedium
J resolution None
J status Open
J submitter lars_h
J subsystem 43.\sRegexp
J title Non-BMP\scharacters\sfolded\sback\sto\sBMP
J type Bug
K 3085390fffffffffffffffffffffffffffffffff
U lars_h
Z 4fefd39a926119528979842ee97a2bb3