<i>string is lower, upper not consistent with Unicode database and other languages</i> status still Open with 3 other changes
by
.
D 2025-07-24T05:07:44.614
J icomment \r\nIn\sresponse\sto\sSergey,\sof\scourse\sthe\ssubject\sof\scase\sis\scomplex,\sparticularly\sconversion\sor\sfolding,\swhich\sis\swhy\sI\sonly\saddressed\sthe\s`islower`\sbehavior\sand\snot\sthe\s`tolower,toupper`\swhich\sis\sa\sbigger\scan\sof\sworms\sand\sneeds\smore\sthought.\r\n\r\n\r\n>\sFor\sinstance\sPCRE\sand\sPCRE2\sdon't\sconsider\sit\sas\slowercase\r\n\r\nThe\sissue\swith\sPCRE\sis\sthe\ssame\sas\swith\sTcl\sexcept\sthat\sPCRE2\sclearly\sdocuments\sthe\ssemantics\sthat\s`\\p{Ll}`,\s`\\p{Nd}`\setc.\srefer\sto\sthe\sUnicode\sgeneral\scategory\sproperties\s"Ll",\s"Nd"\setc.\s\r\n\r\n>\sAlso\sJS\sagrees\swith\sthat:\r\n\r\nFor\sthe\ssame\sreason.\sIt\sis\sdocumented\sas\sgeneral\scategory\slookup.\r\n\r\nMy\scontention\sis\sthat\sit\sis\snot\sdesired\sbehavior\sfor\scategorizing\slower\scase\scharacters\sbecause\sin\smy\sopinion\slower\scase\scharacters\sshould\sbe\sexactly\sthose\sto\swhich\sthe\sUnicode\sstandard\sassigns\sthe\s`Lowercase`\sproperty.\sI\swould\snot\ssay\sPCRE\sor\sJS\shave\sa\sbug\sbecause\sthey\sspecifically\sdocument\sthe\ssemantics\sof\s`\\p{}`\sas\smembership\sin\sa\sspecific\sgeneral\scategory.\sStill,\sI\sdon't\sthink\sit\sis\sdesirable\sbehavior.\sTcl\son\sthe\sother\shand\sdoes\snot\sdocument\s`is\slower`\sin\sterms\sof\sUnicode\sgeneral\scategories\sat\sall.\r\n\r\n>\s"\\u00aa"\s==\s"\\u00aa".lower()\sand\s"\\u00aa"\s!=\s"\\u00aa".upper()\r\n>\sFalse\r\n\r\nCharacters\sthat\sdo\shave\sa\slowercase/uppercase\sproperty\sdo\snot\snecessarily\shave\sa\supper\scase,\slower\scase\sequivalent.\sThe\smapping\sfunction\sthen\smaps\sit\sto\sitself\s(just\sas\s`string\stoupper\s1\s->\s1`)\sso\sthe\ssecond\sclause\sabove\sis\sfalse.\r\n\r\n>\s`>>>\s"ß".upper()`\r\n>>\s'SS'\r\n\r\nThat\sseems\scorrect\sto\sme.\sPython\sseems\sto\suse\sthe\s[Uppercase_Mapping](https://www.unicode.org/reports/tr44/#Uppercase_Mapping)\sproperty\sas\sopposed\sto\s[Simple_Uppercase_Mapping](https://www.unicode.org/reports/tr44/#Simple_Uppercase_Mapping).\sAs\sI\ssaid\s*mapping*\sis\sa\sdifferent\skettle\sof\sfish\sthan\s*classification*\sand\sneeds\sa\smore\scomplex\sdiscussion.
J login apnadkarni
J mimetype text/x-markdown
K 1ecea01196a19b73226d5c822e5fdaf22111aa54
U apnadkarni
Z 2b7f194feebdf293a3abd1efabd6dd2d