close ad
 
Important WebAssist Announcement
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 5:05 am by lr_leal239405 | Last modified 3/22/2019 3:31 pm by Ray Borduin | 692 views | 8 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
Did this help? Tips are appreciated...

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
Did this help? Tips are appreciated...

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

lr_leal239405

There's a specific folder with some pages in which I cannot successfully change the diamonds to the correct symbols. It's the same website, and the connection file has the same code as above. The DB is set to utf-general-ci, so are all the columns and so is the php file with the meta tag set to <meta charset="UTF-8">. I do a view source and it's correct, but the diamonds keeps displaying, until I change my browser to view as Western. What could I be missing? The page has a login so I can't send you the link for you to view. Is there a php option to force it? I saw something about ICONV but not sure how to implement yet.

Sign in to reply to this post

Ray BorduinWebAssist

You could try:

php:
<?php

ini_set
'default_charset''UTF-8' );
?>
Sign in to reply to this post
Did this help? Tips are appreciated...

lr_leal239405

Thanks. I have that in there. No go. Maybe you'll spot it immediately. I have dbs and all set correctly from what I see. Can I call you later? Is this something you could provide some tech support on a support ticket?

Sign in to reply to this post

Ray BorduinWebAssist

Yes. Call me and we can screen share to figure it out.

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

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