News for hackers. Stuff that matters.
Re:A popular but wrong way to convert a string to uppercase ... by Muromec on Tuesday October 08, 2024 @06:09AM (#41775576)
Well, the only time you can do str lower where unicode locale awareness will be a problem is when you do it on the user input, like names.

How about you just dont? If it's a constant in your code, you probably use ASCII anyway or can do a static mapping. If it's user user input -- just don't str lower / str upper it.

Re:A popular but wrong way to convert a string to uppercase ... by account42 on Wednesday October 09, 2024 @10:19AM (#41788244)
Yes, except when it is not your choice. If the requirements are to display some strings in lower/uppercase then you need to find a way to do that. That doesn't have to be using the standard library though.