This topic is locked

phpRunner UTF-8 (Unicode) not working on publishing

7/23/2019 2:03:24 AM
PHPRunner General questions
M
moizizzy author

Hi Team,

I have the below setup on my local computer and cloud server/

IIS 10, PHP 7.2

SQL Server 2016

I have explicitly added the below line in the header:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
When I build the app and Open Browser using the phpRunner built in browser the Arabic text displays perfectly, however when i publish it to the Cloud Server and view the same field it gets converted to "????? ???? ??"
I tried to set the arabic/unicode text explicitly in the field name by stating [$value = "يوسر"] in this scenario it worked both on my local computer and in the cloud.

This is what I get when setting the text explicitly --> So i guess this proves there is no problem with the character encoding on the client side or in the headers.

Arabic Name

يوسر
However when i set the value back to Default "Text" option it stopped working on the Cloud and this is what i get

Arabic Name

??? ???? ????? ???? ????? ?? ????
This leads me to believe it has something to do with the SQL Server connection that PHP is querying with. Any clue or help in this direction would be very helpful.
Did some additional research by typing some incorrect code and i realised there is a difference in the drivers each is calling

-------CLOUD SERVER-------

102 [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]
--------LOCAL DEVELOPMENT MACHINE WHERE IT IS WORKING--------

​Source: Microsoft OLE DB Provider for SQL Server

M
moizizzy author 7/23/2019

ok so i went into ConnectionManager.php and commented out the following lines. But please tell me there is a better way to achieve this or am i doing something wrong??
if( isSqlsrvExtLoaded() )

{

//include_once getabspath("connections/MSSQLSrvConnection.php");

//return new MSSQLSrvConnection( $data );

}

admin 7/23/2019

It is quite possible that some SQL Server drivers handle UTF-8 data better. You should use one that works for you on your web server.