Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15391151
D21857.id52094.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
524 B
Referenced Files
None
Subscribers
None
D21857.id52094.diff
View Options
diff --git a/src/utils/utf8.php b/src/utils/utf8.php
--- a/src/utils/utf8.php
+++ b/src/utils/utf8.php
@@ -288,13 +288,9 @@
* @return int The character length of the string.
*/
function phutil_utf8_strlen($string) {
- if (function_exists('utf8_decode')) {
- return strlen(utf8_decode($string));
- }
return count(phutil_utf8v($string));
}
-
/**
* Find the console display length of a UTF-8 string. This may differ from the
* character length of the string if it contains double-width characters, like
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 16, 8:26 AM (5 d, 23 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7706637
Default Alt Text
D21857.id52094.diff (524 B)
Attached To
Mode
D21857: Remove call to PHP "utf8_decode()" in "phutil_utf8_strlen()"
Attached
Detach File
Event Timeline
Log In to Comment