iconv or mbstring?

北战南征 提交于 2019-12-21 07:36:34

问题


Which multibyte-handling library should I use : iconv or mbstring ?

After some Googling I didn't find enough arguments to convince me to use one particularly, and I could not get any benchmark (and I'm too lazy do create one :-p).

After all maybe this choice doesn't really matters ?

Thanks for any piece of advice.


回答1:


I tend to use a combination of both - depending on my needs. I use iconv to convert from one charset to another, but mbstring for simpler operations like mb_strtoupper() and mb_stristr(). But if only one of the libraries is needed I suggest using mbstring purely for it's widespread functionalities and ease of use.



来源:https://stackoverflow.com/questions/4050754/iconv-or-mbstring

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!