Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 7 commits into from
Sep 22, 2022

Conversation

asmecher
Copy link
Contributor

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'.

…le.php


Fixed variable naming typo (thanks!)

Co-Authored-By: Alexkurd <[email protected]>
@saulery
Copy link

saulery commented Aug 30, 2021

Hello,

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

Regards,

@hsarslan
Copy link

I am also waiting for this fix.
Thanks.

@saulery
Copy link

saulery commented Jan 10, 2022

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

@wisskid
Copy link
Contributor

wisskid commented Jan 10, 2022

@lkppo cool!

@saulery
Copy link

saulery commented Jan 10, 2022

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.

@wisskid wisskid merged commit 0fb2902 into smarty-php:master Sep 22, 2022
@saulery
Copy link

saulery commented Sep 22, 2022

Hi @wisskid,

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

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants