Working with files and utf8 in PHP

后端 未结 3 1405
无人共我
无人共我 2020-12-16 03:18

Lets say I have a file called foo.txt encoded in utf8:

aoeu  
qjkx
ñpyf

And I want to get an array that contains all the lines in that file

3条回答
  •  一生所求
    2020-12-16 03:55

    It sounds like you've already got your answer, but it is important to recognize that unicode characters can be stored in multiple ways. Unicode normalization* is a process which can help ensure comparisons work as expected.

    • http://en.wikipedia.org/wiki/Unicode_equivalence

提交回复
热议问题