studio_two
Posts: 27
|
Posted: 08/04/2016, 4:09 AM |
|
Hello,
I have upgraded one of my projects to CCS v5.x, but now noticed that text fields containing the DEGREE symbol render as completely blank.
I am hosting my web site on XAMPP 5.6. I have checked within phpMyAdmin, and the fields look fine from there.
Can anyone offer any help?
Kind Regards,
Stephen
|
|
|
studio_two
Posts: 27
|
Posted: 08/18/2016, 6:55 AM |
|
This wasn't only an issue with MySQL, but also (less noticeably) within SQL Server too. All along, I suspected this was a mismatch between the CharacterSet within the database and the PHP generated by CodeCharge.
In the end (after experimenting with some handwritten PHP), I discovered that including "CharacterSet" => "utf-8" within the "sqlsrv_connect" statement appears to fix the problems.
However, I can't see any way to set this within the CodeCharge Studio Database Connections. The only place I can find to set "utf-8" is within "Locales and Encodings" for the entire project. That doesn't seem to have any effect at all.
So, I decided to amend the "db_sqlsrv.php" file directly (see below).
private function createConnectionInfo() {
return array(
"Database" => $this->DBDatabase,
"UID" => $this->DBUser,
"PWD" => $this->DBPassword,
"CharacterSet" => "utf-8", // ** THIS IS THE LINE I ADDED **
"ReturnDatesAsStrings" => 1
);
}
So far, it works, but are there are issues with amending the "db_sqlsrv.php" file manually?
|
|
|
|