IJELLH
March 15, 2021, 9:11am
1
Our website is showing special character like (i€™)
Please check below link and find ’
https://ijellh.com/OJS/index.php/OJS/article/view/8494
This is caused by wrongly encoded text from the database and on your OJS.
Try changing the connection_charset on your config.inc.php on your OJS system to utf8.
However, you can also check this guide for fixing the encoding but with careful attention (backup your database before initiating this step)
## Fixing mixed database encodings of Latin1 to UTF8 in OJS
From https://www.whitesmith.co/blog/latin1-to-utf8/, with thanks to Alec Smecher for the suggestion.
This assumes the incorrectly encoded database exists (called ojs_latin in this example). As always, **make sure you have backups**!
### Log into your future database host to create a new database with an UTF-8 charset named ojs
```
$ mysql -h 127.0.0.1 -u USERNAME -pPASSWORD
mysql> CREATE DATABASE `ojs` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
exit
```
### Flush the current database schema on the future host, replacing all CHARSET=latin1 occurrences along the way
```
mysqldump --column-statistics=0 -h 127.0.0.1 -u USERNAME -pPASSWORD ojs_latin --no-data --skip-set-charset --default-character-set=latin1 \
| sed 's/CHARSET=latin1/CHARSET=utf8/g' \
| mysql -h 127.0.0.1 -u USERNAME -pPASSWORD ojs --default-character-set=utf8
This file has been truncated. show original