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

Elimininate the calls to utf8::upgrade() #2745

Closed
bschmalhofer opened this issue Dec 5, 2023 · 1 comment
Closed

Elimininate the calls to utf8::upgrade() #2745

bschmalhofer opened this issue Dec 5, 2023 · 1 comment
Assignees
Labels
tidying Tidying of the code
Milestone

Comments

@bschmalhofer
Copy link
Contributor

bschmalhofer commented Dec 5, 2023

Throughout the code base there are some calls to utf8::upgrade(). These are perfectly fine as we want Perl strings with internal UTF-8 encoding. However most of these upgrade strings that come from Kernel::System::YAML::Dump(). That method already upgrades the generated YAML strings. So I propose to remove the redundant calls. Especially as I fear that utf8::upgrade() is not employed consistently. The utf8::upgrade()in Kernel::System::YAML must of course stay intact.

$ grep -rl utf8::upgrade Kernel/System/
Kernel/System/ACL/DB/ACL.pm
Kernel/System/.YAML.pm.swp
Kernel/System/DynamicField.pm
Kernel/System/ProcessManagement/DB/ActivityDialog.pm
Kernel/System/ProcessManagement/DB/Transition.pm
Kernel/System/ProcessManagement/DB/TransitionAction.pm
Kernel/System/ProcessManagement/DB/Process.pm
Kernel/System/ProcessManagement/DB/Activity.pm
Kernel/System/YAML.pm
@bschmalhofer bschmalhofer added the tidying Tidying of the code label Dec 5, 2023
@bschmalhofer bschmalhofer added this to the OTOBO 11.0 milestone Dec 5, 2023
@bschmalhofer bschmalhofer self-assigned this Dec 5, 2023
bschmalhofer added a commit that referenced this issue Dec 6, 2023
The strings from Kernel::System::YAML::Dump() are already upgraded
bschmalhofer added a commit that referenced this issue Dec 6, 2023
Issue #2745: remove useless calls to utf8::upgrade
@bschmalhofer
Copy link
Contributor Author

PR is merged. The test suite will be run later. Closing this issue.

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

No branches or pull requests

1 participant