Firefox PHP

Script to convert to UTF-8

Posted by mroek 
Script to convert to UTF-8
February 12, 2022 09:22AM
The database for my Phorum is in latin1_danish_ci, and I was hping to get it to work properly with UTF-8. I've tried a few things, but I can't get it to work.

Maurice Makaay once wrote a script which was located at this address:

[secretsauce.phorum.org]

...but it is no longer available. Perhaps somebody has a copy of it? Not sure it would solve my problem, but perhaps worth a try.

My goal is to be able to use full multibyte UTF-8 characters, like this:

???? ord nr17 - 5/6
????⬜⬜⬜⬜
⬜⬜????⬜⬜
????????????⬜????
⬜????????????????
????????????????????
www.wordle.lol

On my phorum, when trying to post this, I end up with a database error:

Illegal mix of collations (latin1_danish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' (1267):......
Re: Script to convert to UTF-8
February 12, 2022 09:24AM
Ok, so posting that doesn't work on this phorum either. No database error, but it is still wrong. Preview is fine, but most of it just becomes garbled.

For reference, it should have looked like this:





Edited 1 time(s). Last edit at 02/12/2022 09:27AM by mroek.
Re: Script to convert to UTF-8
February 12, 2022 01:59PM
Try this link [www.phorum.org]

Do a search on "script" All Dates
or "Unicode" All Dates

OR
Export your data, change the import to UTF-8 (not sure this spelling) is correct for php & mysql import to a new clean database that stores the way you want. Test, if good make live.

Phorum sanitizes some things differently on preview. Don't know why.
Sorry, only registered users may post in this forum.

Click here to login