close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

set charset causing page to crash

Thread began 11/27/2017 3:40 am by Janet | Last modified 12/02/2017 2:58 pm by Ray Borduin | 1727 views | 8 replies |

Janet

set charset causing page to crash

I'm trying to get rid of those diamonds that appear when characters are entered into the database that don't fit the charset.

I added the line <?php $mysqli->set_charset("utf8"); ?> on the web page, but got an error "Call to a member function set_charset() on null in..."
I also tried to add a meta tag but that did nothing.
Can you advise on where to place this code to make it work? Or is there a better way to do it?

Sign in to reply to this post

Ray BorduinWebAssist

Our connection dialog allows you to set the charset. You have to make sure the database default is set to the same charset is set in phpMyAdmin as well.

Sign in to reply to this post
Did this help? Tips are appreciated...

Janet

Hi Ray,

I have done that, but please forgive me for following up, can you advice me which of the following I need to change, because the "dreaded diamonds" are still showing up (url in private message)

Database
Character Set utf8 -- UTF-8 Unicode
collation utf8_general_ci
Tables utf8_unicode_ci

Php
$SIG2 = new mysqli($hostname_SIG2, $username_SIG2, $password_SIG2, $database_SIG2);
$SIG2->set_charset('utf8');

Sign in to reply to this post

Ray BorduinWebAssist

Do the strange characters show in phpMyAdmin? It is possible they were inserted with the wrong charset and are already corrupt in the database, so there might not be anything we could do to get them to display properly on the page.

I'd need FTP access to debug this. Whatever the issue is it would require changing some php code that I can't access directly from the web.

Sign in to reply to this post
Did this help? Tips are appreciated...

Janet

Hi Ray, I really appreciate you taking a look into that.

I looked in phpMyAdmin and the quotation marks are showing up there, but one of them is showing up as a diamond on the actual page. It seems to be single apostrophes and the first quotation mark.

If you have time I have sent through the access details in private.

Sign in to reply to this post

Ray BorduinWebAssist

I'm unable to connect with that FTP information. The rest of the information seems to work for the database and CMS. Maybe you have IP restrictions that prevent me from accessing? Maybe there is a typo? The error says the login is incorrect.

Sign in to reply to this post
Did this help? Tips are appreciated...

Janet

try this one (in private)?

Sign in to reply to this post

Ray BorduinWebAssist

You didn't have this line in your live connection file:

$SIG2->set_charset('utf8');



Once I added it, the page displays properly.

Sign in to reply to this post
Did this help? Tips are appreciated...

Janet

Thank you sir I appreciate you taking the time to look at it!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...