Re:A popular but wrong way to convert a string to uppercase ...
by fluoridation on Tuesday October 08, 2024 @09:13PM
(#41783502)
Case conversion is not the only string manipulation that's locale sensitive.
Re:A popular but wrong way to convert a string to uppercase ...
by lmm on Tuesday October 08, 2024 @09:39PM
(#41783630)
No reasonable server API should require locale sensitive string manipulation.
Re:A popular but wrong way to convert a string to uppercase ...
by NBJack on Wednesday October 09, 2024 @12:36AM
(#41784533)
Sorry, I think you misspelled "true" and "Scotsman" in that sentence.
Examples and reasoning for your assertion?
Re:A popular but wrong way to convert a string to uppercase ...
by NBJack on Wednesday October 09, 2024 @12:33AM
(#41784524)
Word censoring? Ease of use? Console commands (i.e. from Quake to minecraft)?
Re:A popular but wrong way to convert a string to uppercase ...
by lmm on Wednesday October 09, 2024 @02:44AM
(#41785163)
> Word censoring?
Should only ever be needed for text from the user, and in that case, as GP said, find a way to examine it as-is, don't "convert".
> Ease of use?
What ease of use? When has futzing around with case ever made anything easier?
> Console commands (i.e. from Quake to minecraft)?
Why would those necessitate changing case?
Re:A popular but wrong way to convert a string to uppercase ...
by wongarsu on Wednesday October 09, 2024 @12:49AM
(#41784604)
Those sound exactly like the newcomer detectors GP was referring to. What you want is a case-insensitive string comparison, and outside ASCII that's not equivalent to just turning both strings to lowercase and checking equality (or doing a substring search or whatever the task requires)
What conceivable reason would there be to ever need to do that? If the server takes commands in upper case, then have them in upper case from the start. If the server takes commands in lower case, have them in lower case from the start. If the server specifies that you need to invert the case of its response to use in the next request, find a server developed by someone not crazy.