CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Special Characters not displaying

Print topic Send  topic

Author Message
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
View profile  Send private message
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?


View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.