ILIAS icon indicating copy to clipboard operation
ILIAS copied to clipboard

Refinery: Encoding

Open chfsx opened this issue 11 months ago • 3 comments

This PR adds a UTF8 string transformation to the refinery which can be used to replace utf8_encode calls in ILIAS, see https://github.com/ILIAS-eLearning/ILIAS/commit/9f1b9b68d97943050fb74c5ca8e4663196f4ac3f

examples how to use that are in https://github.com/ILIAS-eLearning/ILIAS/commit/b3f364b97648fe69c331dc039e1c381646f5192f which fixes the issues:

https://mantis.ilias.de/view.php?id=40543 https://mantis.ilias.de/view.php?id=40542

chfsx avatar Mar 01 '24 15:03 chfsx

a second Transformation for ISO-8859-1 should be introduced as well to replace utf8_decode calls.

chfsx avatar Mar 01 '24 15:03 chfsx

Fixed tests in https://github.com/ILIAS-eLearning/ILIAS/pull/7124/commits/023d88838ebb38db9e04295529f93758eb5e74dc

chfsx avatar Mar 01 '24 16:03 chfsx

Thank you very much for the quick feedback!

yes i think it is a bit urgent, because i would like to remove the deprecations of PHP8.2 before ILIAS 9 is finished. therefore i have made the (very useful!) changes as requested:

  • Naming 1: new is encoding a group, two methods are now offered, latin1ToUtf8 and asciiToUtf8, as these are probably the most common according to a short research.
  • Detection: is now abolished and you explicitly select from and to by choosing the method on the group
  • Naming 2: is adapted accordingly, see above

chfsx avatar Mar 05 '24 06:03 chfsx

Hi @chfsx,

didn't have this on my radar. Feel free to ping me and/or @mjansenDatabay via comment next time.

Will have a look into this now.

Kind regards!

klees avatar Mar 21 '24 09:03 klees

I have merged this manually after resolving conflicts. Thanks a lot! Good stuff.

klees avatar Mar 21 '24 09:03 klees

Picked to trunk!

klees avatar Mar 21 '24 09:03 klees