You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1ffcb2a
Browse filesBrowse the repository at this point in the historyBrowse files
ext/standard: Check for UTF-8 first when resolving the charset of html functions
determine_charset() ran strlen() and walked the charset map with case-insensitive
compares on every call, while "UTF-8" (explicit or from default_charset) is what
nearly every call asks for. It now checks for "utf-8" in any case first, and moves
the walk to a separate function.
The codesets of the charset map are now lowercase. The walk lowercases the hint once,
then compares the length and the first byte before calling memcmp(), so other charsets
resolve faster too. The "utf-8" entry of the charset map is removed, since the walk
can no longer reach it.
0 commit comments