#46089 [Opn->WFx]: Case folding should be off by default

From: Date: Tue, 16 Sep 2008 06:10:51 +0000
Subject: #46089 [Opn->WFx]: Case folding should be off by default
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-129014@lists.php.net to get a copy of this message
ID: 46089 Updated by: chregu@php.net Reported By: joeedh at gmail dot com -Status: Open +Status: Wont fix Bug Type: XML related PHP Version: 5.2.6 New Comment: Turning it off is a oneliner in your script and if you do a php.ini, you have to do this oneliner nevertheless as you never know, if it does casefolding or not. Even if ou don't write php scripts for the "public", you may have two scripts, one expects casefolding as the default, the other doesn't, so both have to do the xml_parser_set_option line Changing the default doesn't actually help anyone, it is just actually more work to anyone and this behaviour is well documented. The newer XML extensions like XML Reader and DOM of course do not do case-folding anymore Previous Comments: ------------------------------------------------------------------------ [2008-09-15 23:12:14] joeedh at gmail dot com Description: ------------ Case folding is against the XML standard, as stated in: http://markmail.org/message/exlh6us4wpbt7juk#query:xml%20case%20folding%20xml-dev+page:1+mid:rikx6p3veteu5und+state:results and: http://www.xml.com/axml/notes/CaseSensitive.html A previous bug was submitted in 2003 about this issue; the decision then was that backwards compatibility trumped adhering to the standard. I'd like to resubmit this issue for consideration, with the following arguments: * XML is a standard. As such, people expect XML parsers to all behave the same way within reasonable limits. Violating the standard is definitely something people never expect the parser to do. * Backwards compatibility is important, yet there are ways to mitigate the problems. Deprecation warning are used a lot. Unfortunately, they'd be fairly tricky in this case. I guess one way would be to have a flag in php.ini to use the old default. And also perhaps have a version of PHP (with the same default) that spat out warnings if the case folding setting isn't user-set *with a note about the php.ini flag and that the default will change next version* (of course the warnings would be disabled if the flag is set). As evil as that would be, it's the only deprecation warning scheme I can think of (not that I have the slightest experience deprecating aspects of APIs or languages :) ). * Finally, to expand on my first point, since case folding is against the XML spec, enabling it by default screws everyone over who is using XML precisely because it *is* a standard. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46089&edit=1

« previous php.bugs (#129014) next »