Review main Abandoned

26536[BUGFIX] CharsetConverter::crop() calls utf8_char2byte_pos

Michiel Roos CR 0 V 0 Easy +9 −2 updated 12/22/13, 18:37

Commit message

* Regular PHP substr() works fine on regular UTF-8 strings;
* TYPO3 backend is fully UTF-8 based by default in 6.1;
* Database connection is enforced to be UTF-8 during bootstrap;

The call to utf8_char2byte_pos() can be skipped and the substr() result
returned immediately when the charSet is utf-8.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 4

  1. Michiel Roos wrote 12/21/13, 23:55

    Topic set to "performance".
  2. Mr. Jenkins commented on patch set 1 12/21/13, 23:59

  3. Markus Klein commented on patch set 1 12/22/13, 14:45

    Does it make sense to change this code at all? On default 6.2 installations the mbstring PHP extension is enabled by default by the Install Tool. So the remaining code of this method is useless.

    CharsetConverter.php:1672

    ===
  4. Michiel Roos abandoned the change 12/22/13, 18:37

    You are right. The install tool should have set the mbstring preset for me, but did not since I used the TYPO3 Workbench install script to setup my environment. That does not yet handle the mbstring setting.