close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Issue with Character sets

Thread begun 1/13/2018 8:47 am by bjgarner241692 | Last modified 1/23/2018 11:38 am by Ray Borduin | 3074 views | 17 replies |

bjgarner241692

Issue with Character sets

I have a php site with a MySQL database. Recently moved site to GoDaddy and I have an issue displaying french language characters.
Everything is fine on old server.

On new server, display is fine in DataAssist Admin pages, but incorrect in the Data Assist Search pages in the public part of my site.
DB collation is identical. Pages are obviously identical.

There is something in the query in the DataAssist Admin pages that is missing in the public pages that forces the correct display, but I cannot find it. The public page uses Data Assist Search

Any clues?

In the reading I have done, I find that it is not enough to simply declare utf-8 in the header because there can be an underlying character set default in the MySQL database but I cannot isolate what (if anything) is present in the DataAssist pages that I am missing in my own pages.

Sign in to reply to this post

Ray BorduinWebAssist

You can set the charset in the database connection too. This is one where I'd need FTP access to check all of the places where it might be wrong.

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

bjgarner241692

See PM

Sign in to reply to this post

Ray BorduinWebAssist

It looks like the charset for the database was set to latin1. That conflict could cause issues displaying results.

I've updated the database charset, but that may have corrupted the data itself. Please check that it is correct in the database. Can I get access to the phpMyAdmin?

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

bjgarner241692

Thanks. That exposes the problem. Original database is setup as the MySQL Default. latin1_swedish_ci, however, the data is utf-8. The export just garbles it. Looking into possible ways to convert the data on the original db and then export it. Not sure it is possible with the current setup though.

Sign in to reply to this post

bjgarner241692

Solved. Tried several methods to convert but settled on emptying the table, changing the collation on the affected fields, and re-importing.

Thanks for your input Ray. It pointed me in the right direction.

Sign in to reply to this post

bjgarner241692

Still struggling with this.
When importing the sql file from the original server, the GoDaddy file is converting the data.

Issues are:
Château becomes Château (as an example right out of database with HeidiSQL)

Also, while Château displays correctly on my public page as well as my admin page,(Château) when I pick it out of a drop down list it will not find a match.

Likewise, it will not match a Keyword search. If my DataAssist Search pages would recognize the pattern I have no problem. The new database is latin1_swedish_ci as is the old one. Both new and old databases have the issue of not matching many of the words with special characters. Viewing Source shows the 'translated' Château.

Sign in to reply to this post

Ray BorduinWebAssist

If your database has latin1_swedish then you should use a connection and html page with that charset. Usually I suggest using utf8 for all, but the key is consistency that is key.

I'd just update everything to utf-8. Worst case scenario you may have to fix the field values in the database itself, but everything should be working at that point and have consistent results.

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

bjgarner241692

Made a copy of db on old server.
Ran queries to convert db and tables to utf-8.
Display is fine on all pages.
Search will not match though if there are special characters.

Exported utf8 table
Imported on GoDaddy using HeidiSQL. Characters were altered in db.
Dropped table and am trying an import through PHPMyAdmin.

I don't understand why it won't import it as is. I can see the correct characters in my SQL file.

Even if I can get it imported though, I still have the matching issue on a search. If there is a special character in the word I am matching it will fail.

Sign in to reply to this post

bjgarner241692

Got the import to work. Data is identical on both servers. Display is fine.
Just left with the fact that if I type a word like: Îles or AÎNÉS or Rivière it will not match on my public page but it matches perfectly in my _admin page. Both are DataAssist and I cannot find a difference.

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