close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Strange characters; du to Latin-1 in stead of utf8 in database?

Thread began 11/27/2015 7:53 am by Stuward | Last modified 12/15/2015 9:54 am by Ray Borduin | 2007 views | 11 replies |

Stuward

Strange characters; du to Latin-1 in stead of utf8 in database?

While moving/testing to a different webserver (Digital Ocean), there do appear strange characters at the cms output on the page.

The chinese text is completely unreadable, see screenshot.

Digital Ocean refers to info below:
https://www.blueboxcloud.com/insight/blog-article/getting-out-of-mysql-character-set-hell

What solution do you suggest?

Sign in to reply to this post

Ray BorduinWebAssist

Update your database charset to utf-8 for the columns you are having trouble with... then make sure that the pages also have utf-8 charset defined in the meta tags.

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

Stuward

Ok, thanks for the advice!

Sign in to reply to this post

Stuward

Still not working completely. The charset of all colums are set to utf-8 but the problem gets strange.

At Digital Ocean it seems to be ok, but on 2 other servers (1 for testing and 1 for production) the characters are messed up.

I have made screenshots of 2 situations:
Situation 1: This is the old used setup I use last year - website is working, cms is working, corresponding database is messed up
Situation 2: This is a test to see what happens when I make the database correct: both website as cms are messed up

At Digital Ocean, a correct database delivers a working website and CMS. So this is the set-up as it should be. All files are an exact copy 1 on 1.

How to solve this?

Sign in to reply to this post

Ray BorduinWebAssist

Does the content look correct in the database? If it got inserted wrong in the first place and it is garbled in the database, then there may not be a fix other than to re-enter the content with the correct encoding.

If you give me FTP access and a URL and steps to reproduce the issue I can debug it and see if I can find a solution.

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

Stuward

The content is inserted correctly and the database messed it up. Will send the ftp access later as it is weekend here in europe.
Thanks!

Sign in to reply to this post

Stuward

See pm

Sign in to reply to this post

Ray BorduinWebAssist

Try adding this to the bottom of your connection file:

mysql_set_charset('utf8',$PowerCMSConnection);



It looks like you aren't setting the charset in the database connection itself.. that might be causing the disconnect.

For some reason I was having a hard time debugging with the information you gave me... When I ftp changes the pages weren't changing and when I updated the database it appeared to be pointing to another database... I'm not sure what was going on but it was like I had connection information for different sites.

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

Stuward

Thanks Ray, tested One page and your solutions looks promising. Adding "mysql_set_charset('utf8',$PowerCMSConnection);" to the connection file does the trick apparently.

Sign in to reply to this post

Stuward

Tested the complete site and works. Only inline editing is still messing caracters. I can disable inline editing for now, but it would be nice if it worked for future use. see pm.

Regards, Stuward

Sign in to reply to this post
loading

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