Urdu Language Issue

Hi

I just installed OJS Version 3 and the Sub Titles in Urdu Language have been changed into Questions marks. like this ???

Please look at the articles in Screenshot. I tried to type Urdu Language in backend but didnt work. In previous version it worked fine.

image

Hi @a2usmani,

Double-check your character set and collation settings in config.inc.php, and make sure you created the database with the right default character set (typically UTF8).

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher
I checked as you said. Here are the settings I found in the file

; Default locale
locale = en_US

; Client output/input character set
client_charset = utf-8

; Database connection character set
; Must be set to “Off” if not supported by the database server
; If enabled, must be the same character set as “client_charset”
; (although the actual name may differ slightly depending on the server)
connection_charset = utf8

Now please guide what to do?

The configuration settings look correct, but the database may still have a different character set and collation. You can check these by running the following SQL query on your database (replace db_name with your database name):

SELECT DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME
FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = 'db_name';

asdasd

I got this on running the query. Please guide next

Thankyou

@NateWr @asmecher Please see the above post.

Hi @a2usmani,

The latin1_swedish_ci result is a problem; it should be UTF8. This is usually set when you create your database, e.g.:

CREATE DATABASE my_database_name DEFAULT CHARACTER SET utf8;

Do you know how the default character set was configured before you ran your upgrade? (You can check this in a database dump by looking at the CREATE TABLE statements, if you have a backup taken before you ran the upgrade.)

Regards,
Alec Smecher
Public Knowledge Project Team

Now when I tried to change it. There was no change and also it returned an error that I dont remember right now.

Dear @asmecher

Its more than a year I tried, again and again, trying different methods and character sets since I dont know much about databases.

The reply to the above is, that I installed OJS on the default character set. I never installed it by myself making a database in Cpanel. I just used softaculous installer to install OJS.

Before running the upgrade the character set was the same i.e. latin1_swedish_ci in all of my installations .

It’s too old a version and I want to upgrade. I have been successful in upgrading which have English titles and subtitles but in websites that have Urdu, languages have a problem in upgrading.

The titles or subtitles convert to ??? (Questions marks)

Please help me since I want to upgrade.

Thankyou

@NateWr @asmecher

Sorry for tagging you again. I know you are much busy. But now we need to upgrade the journal. Ther version is 3.3…0.3

  1. I copied all the files and databases to another server for testing.
  2. During database making, I made a database and apply the character set of utf8_unicode_ci on a blank DB
  3. asas
  4. then I uploaded the old database.
  5. The website was working before the upgrade and the titles were fine
  6. I ran the upgrade with 3.3.0.11
  7. The upgrade was successful and all titles were in place and there was no font issue.
  8. I tried to make a new submission.
  9. Files were uploaded during submission
  10. I got this error when I clicked schedule for publication.

An unexpected error has occurred. Please reload the page and try again.

The log was this

[06-Jul-2022 08:17:03 UTC] PHP Fatal error: Uncaught Exception: DB Error: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’ Query: SELECT v.*
FROM versions v LEFT JOIN plugin_settings ps ON
lower(v.product_class_name) = ps.plugin_name
AND ps.setting_name = ‘enabled’ AND (context_id = ? OR v.sitewide = 1)
WHERE v.current = 1 AND (ps.setting_value = ‘1’ OR v.lazy_load <> 1) in /home/hamdardis/public_html/joqs/new/lib/pkp/classes/db/DAO.inc.php:703

From the above log, i checked the database

The db collation (from the Operations tab in phpmyadmin) was utf8_unicode_ci
The tables collation (from the structure tab) was utf8_general_ci

Please guide what should I do.

Thankyou

@rcgillis Please see and advise. Sorry to tag nyou

Hi @a2usmani,

I’m afraid this is a MySQL issue more than an OJS issue, and we can only provide limited help with it. OJS only requires that the data in the database be consistently encoded according to the settings provided in config.inc.php. It looks like your encodings are still mixed; you’ll need to work inside MySQL to resolve it.

For more information on debugging this, I’d suggest using StackOverflow; there will be a lot of guidance there.

Regards,
Alec Smecher
Public Knowledge Project Team