close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

how to get rid of diamond symbols on latest php version?

Thread began 2/22/2019 8:05 am by lr_leal239405 | Last modified 2/27/2019 1:11 pm by Ray Borduin | 61 views | 4 replies |

lr_leal239405

how to get rid of diamond symbols on latest php version?

I am moving the website to vps hosting with latest php. I'm now seeing symbols (diamonds) for apostrophes and reg symbol. I do have that (, false) statement you told me to put. and htmlentities, stripchar etc. but I still get them. I've tried UTF-8 Charset and back to 8859-1. Any suggestions would be appreciated. See link below. Thanks.

Sign in to reply to this post

Ray BorduinWebAssist

This is usually because of a mismatch between the charset of the database column and the page. They need to match and usually UTF-8 is the best option to accommodate all characters. If the mismatch happened when the data was inserted or updated it might be wrong in the database column itself and have to be corrected before it will display properly on the page.

Sign in to reply to this post

lr_leal239405

The old server handling it ok (using php 5.3). The new server using php 7.3 and newer version of mysql displays diamonds. I change cx to db to old server from new hosting and I still get the diamonds no matter if I specify meta utf-8 or iso-8859-1. The old page (#1 see below) doesn't even match as the html page is set to meta iso-8559 but the db is utf8_general_ci (including the fields).

the code on the page is:

<?php echo ((substr((html_entity_decode($WADAnews->getColumnVal("news_content", false))), 0, 200))) . "......"; ?> READ FULL STORY <img src="images/arrow.png" width="10px" height="auto" alt=""/>

Thanks for your help.

Sign in to reply to this post

Ray BorduinWebAssist

I'll need FTP access to the site with the issue in order to debug why it isn't working. Did you set the charset in the Connection file? It should be set there as well.

I would verify the charset is set to utf-8 in all three locations:

1) set in the database column
2) set in the connection
3) set on the page

Sign in to reply to this post

lr_leal239405

It looks like placing the code in the connection file finally did it for me.

mysqli_set_charset($conn,"utf8");

Thanks much for the direction!

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...