smarty icon indicating copy to clipboard operation
smarty copied to clipboard

#155 Adapt Smarty upper/lower functions to be codesafe (e.g. for Turkish locale)

Open asmecher opened this issue 4 years ago • 5 comments

This PR changes the ucfirst/lcfirst/strtoupper/strtolower calls in the code that work with method, class, and variable names. These calls are replaced with equivalents (e.g. using strtr) that do not change depending on the system locale. This resolves a problem in particular with tr_TR, for which strtolower('I') != 'i'.

asmecher avatar Apr 14 '20 22:04 asmecher

Hello,

I need also this fix for a Turkish translation of Wikindx users.

Regards,

lkppo avatar Aug 30 '21 11:08 lkppo

I am also waiting for this fix. Thanks.

hsarslan avatar Aug 30 '21 11:08 hsarslan

PHP RFC: Locale-independent case conversion corrects it for PHP 8.2.

lkppo avatar Jan 10 '22 11:01 lkppo

@lkppo cool!

wisskid avatar Jan 10 '22 12:01 wisskid

Isn't it! I have patched my code with this PR for several months and it is working fine. By the way, I factored with functions ucfirst_ascii(), strtolower_ascii() to minimize the modifications.

lkppo avatar Jan 10 '22 13:01 lkppo

Hi @wisskid,

Thanks for merging this PR. My hand patching can go now!

Regards,

lkppo avatar Sep 22 '22 22:09 lkppo