Comparing two unicode strings in PHP

前端 未结 2 939
一生所求
一生所求 2021-01-20 18:15

I am stuck in comparing two unicode strings in PHP which both contain the special char \'ö\'. One string comes from $_GET, the other one is a filesystem\'s fold

2条回答
  •  無奈伤痛
    2021-01-20 18:59

    Can you try parsing them through utf8_encode() and checking them there? PHP doesn't support unicode and therefore advises to use utf8_encode/decode for some basic Unicode features.

    http://php.net/manual/en/language.types.string.php

提交回复
热议问题