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

Seeing strange characters on the page after migration to new environment

Thread began 11/17/2022 3:21 pm by art226587 | Last modified 12/09/2022 12:08 pm by Ray Borduin | 38 views | 11 replies |

art226587

Seeing strange characters on the page after migration to new environment

I have a DataAssist site that shows funny characters in the db, but displays the correct bullets, curly quotes, etc in the browser. I recently tried migrating the code and an export of the db to a new dev environment and I'm still seeing those funny characters in the db, but they're also displaying in the browser, like so:

"...highlighting “not just for Christmas” ..."

Nothing has changed in the code between the two environments except for the credentials in the db connection file.

The live db server's charset is cp1252 West European (latin1)
The dev db server's charset is UTF-8 Unicode (utf8mb4)

I can't change target db server's charset.

I recently migrated a different DataAssist site that had the same funny characters in the db and that also displayed correctly in the browser to the same environment and it's displaying correctly in the browser.

Just unsure where the issue is since it's working on the one site and not the other. I can't for the life of me figure out what I did differently between the two.

Sign in to reply to this post

Ray BorduinWebAssist

Charsets can be set in the database, in the connection file, and in the HTML. All three need to be in sync in order for all characters to display properly.

It is possible your connection or page had a different charset causing this issue. I'd check the connection files to see if they have different charset settings.

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

art226587

Thanks, Ray. The php files all have a "<meta charset="utf-8">" tag in the head. I don't see anything in the connection file (below) that appears to be related to charset. Of course there's all of the files in the _mmServerScripts directory that I haven't checked. Would you have some time on Friday to go over some of this stuff with me? It sounds like you could find the culprit faster than I.

Sign in to reply to this post

Ray BorduinWebAssist

If you go into the connection settings UI you will be able to set a charset.... The connection file you have doesn't have one set.

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

art226587

I was able to remedy this issue on one site but not the other. The one that's working now is displaying strange characters in the db on both live and dev sites. When I added the charset to the connection script on the dev site, it corrected the issue and now shows bullets and curly quotes, etc.

On the other site, there are also strange characters in both the live and dev site databases. The live website shows bullets and curly quotes, etc. But after adding the charset to the connection script on the dev site, it still shows strange characters. Aside from the one line added to the connection script, the code on both live and dev sites is identical.

Not sure what to try next.

Sign in to reply to this post

Ray BorduinWebAssist

If you give me FTP access and a URL, then I can take a look.

Usually the charset can be set in the database itself, the connection, and on the html page, and if they are all in sync you shouldn't get strange characters (unless they are in the database that way to begin with)

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

art226587

Strange characters exist in the db. For some reason that's not a problem on the live site, just the new dev site. Do you just need access to the dev site?

Sign in to reply to this post

Ray BorduinWebAssist

Yeah... That's a tough one. Most likely there was a mismatch when the data was inserted or updated in the database, so it is wrong in the database itself. Sometimes that can be overcome by keeping the mismatch consistent, but really if it is wrong in the database you are just patching the underlying problem if you get it to work and it might be better to update the database to have the correct characters to begin with.

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

art226587

I'm perplexed as to why it's working correctly on the live site There's strange characters in the db and there's no charset in the connection script!

I've looked into converting characters manually in the db using find/replace, but that looks like a snipe hunt at best.

Literally seeing things like this everywhere: ’

Again, another site that I recently migrated had the exact same scenario and it's now displaying correctly simply after I added the charset to the connection script.

What would you recommend at this point?

Sign in to reply to this post

Ray BorduinWebAssist

The default charset may be different on your live site vs your new. You may be able to figure out what the default is and then update your dev server charset to match.

Sign in to reply to this post
Did this help? Tips are appreciated...
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...