STRPOS and SUBSTR with UTF-8 flawed?
Posted: Mon Mar 26, 2007 12:05 pm
I'd like to locate the position of a string in UTF-8.
When I tried this line of code, I received:
日�
I was expecting the last 5 characters after "検索", which should be "、オーク"
Can STRPOS or SUBSTR be used with UTF-8 strings?
Code: Select all
echo substr("日本最大級のポータルサイト。検索、オークション","検索", 5);日�
I was expecting the last 5 characters after "検索", which should be "、オーク"
Can STRPOS or SUBSTR be used with UTF-8 strings?