WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 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 7 years ago.
seems_utf8() some improvements incl. comments.
9692.2.patch (1.8 KB) - added by peaceablewhale 7 years ago.
Conflict resolved
seem_utf8_test.php (1.3 KB) - added by peaceablewhale 7 years ago.
PHP script for testing

Download all attachments as: .zip

Change History (8)

@hakre
7 years ago

seems_utf8() some improvements incl. comments.

#1 @Denis-de-Bernardy
7 years ago

  • Keywords has-patch added

#2 @Denis-de-Bernardy
7 years ago

  • Keywords needs-testing added

@peaceablewhale
7 years ago

Conflict resolved

@peaceablewhale
7 years ago

PHP script for testing

#3 @peaceablewhale
7 years ago

  • Keywords tested added; needs-testing removed

Tested. Please refer to the test script for details.

#4 @Denis-de-Bernardy
7 years ago

  • Component changed from General to Charset

#5 @ryan
7 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.