Encoding SQL_Latin1_General_CP1_CI_AS into UTF-8

后端 未结 7 1900
小鲜肉
小鲜肉 2020-12-09 10:50

I\'m generating a XML file with PHP using DomDocument and I need to handle asian characters. I\'m pulling data from the MSSQL2008 server using the pdo_mssql driver and I app

相关标签:
7条回答
  • 2020-12-09 11:36

    No need for crazy stuff. Collation SQL_Latin1_General_CP1_CI_AS character encoding is: Windows-1252

    This works perfect for me: $str = mb_convert_encoding($str, 'UTF-8', 'Windows-1252');

    0 讨论(0)
提交回复
热议问题