WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

#9692 closed enhancement (fixed)

seems_utf8() can be improved

Reported by: hakre Owned by:
Milestone: 2.8 Priority: normal
Severity: normal Version: 2.7.1
Component: Charset Keywords: has-patch tested
Focuses: Cc:

Description

while working on a utf8 related issue I ran over some little improvements of the seems_utf8() function originally be bmorel at ssi dot fr.

larger string can benefit from a pass by reference and there is no need to call ord($str[CONST])) multiple time for the same value.

Attachments (3)

9692.patch (1.7 KB) - added by hakre 6 years ago.
seems_utf8() some improvements incl. comments.
9692.2.patch (1.8 KB) - added by peaceablewhale 6 years ago.
Conflict resolved
seem_utf8_test.php (1.3 KB) - added by peaceablewhale 6 years ago.
PHP script for testing

Download all attachments as: .zip

Change History (8)

@hakre6 years ago

seems_utf8() some improvements incl. comments.

comment:1 @Denis-de-Bernardy6 years ago

  • Keywords has-patch added

comment:2 @Denis-de-Bernardy6 years ago

  • Keywords needs-testing added

@peaceablewhale6 years ago

Conflict resolved

@peaceablewhale6 years ago

PHP script for testing

comment:3 @peaceablewhale6 years ago

  • Keywords tested added; needs-testing removed

Tested. Please refer to the test script for details.

comment:4 @Denis-de-Bernardy6 years ago

  • Component changed from General to Charset

comment:5 @ryan6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [11414]) seems_utf8() cleanup. Props hakre. fixes #9692

Note: See TracTickets for help on using tickets.