Conversation
|
@gitlost |
Ha, shucks!
I think so, but then I thought so on the previous X versions of trying to fix this... |
|
Thanks very much @miya0001 for that testing and reviewing - I'm curious in your second example about what's pushing out the |
Ah, I tried to change the timezone, but Following is an example of the Following is the example of the after changing the timezone to The value of the It looks problem of the WordPress core. |
|
What do you mean "intl extension"? I guess I don't use it, the WordPress is default. |
|
Ah sorry, I meant the PHP extension http://php.net/manual/en/book.intl.php - I'll take it as a no! |


Issue #117
Uses
grapheme_substr()andpreg_match()insafe_substr()(andgrapheme_strlen()andpreg_match_all()insafe_strlen()) to deal with combining characters correctly, in a manner similar to that instrwidth().Refactors the East Asian Width stuff into a function
_safe_substr_eaw()and addscan_use_pcre_x()helper to check for PCRE\Xavailability.Removes use of
iconv()as it varies widely over PHP versions and isn't easily tested and wasn't that useful anyway.Incorporates the test data from @ShinichiNishikawa.
Fixes a gatepost error in
Ascii::setWidths().Also tries
sttyas well inShell::columns()as relying on the env varCOLUMNSas introduced by me in #113 turns out not to be that great as it's not normally exported. Sigh.Edit: had to add an ICU check function to guard against the old 4.8.1.1 version on Travis (all PHP versions) flaking out - chose 54.1 as min which is Unicode 7.0 and fairly modern.
Also added "phpunit6-compat.php" from core (as introduced by @miya0001 in https://core.trac.wordpress.org/ticket/39822), modded to remove the
getTickets(), and PHP 7.0 & 7.1 to the Travis build, and some php info and the--debugswitch on phpunit.