News:

Join the Facebook Fan Page.

Main Menu

Latin2 database encoding

Started by thommen, May 29, 2024, 03:53:09 PM

Previous topic - Next topic

thommen

I have been sitting on this for quite a while.

I need to move SMF 1.1.21 forum from VPS to hosting. The domain will be the same. I have a problem with the encoding of the characters in Polish and I am asking for help as I have already lost ideas on how to find a way. The problem is with the posts (translation files, they display correctly).
I have
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-2" />

I will write what I have and what I have performed.

VPS:
SELECT DEFAULT_CHARACTER_SET_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = 'smf';
+----------------------------+
| DEFAULT_CHARACTER_SET_NAME |
+----------------------------+
| latin2                     |
+----------------------------+
1 row in set (0.01 sec)


SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = 'smf';
+------------------------+
| DEFAULT_COLLATION_NAME |
+------------------------+
| latin2_general_ci      |
+------------------------+
1 row in set (0.00 sec)


Hosting:
SELECT DEFAULT_CHARACTER_SET_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = 'smf_forum';
+----------------------------+
| DEFAULT_CHARACTER_SET_NAME |
+----------------------------+
| latin2                     |
+----------------------------+
1 row in set (0.000 sec)


SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = 'smf_forum';
+------------------------+
| DEFAULT_COLLATION_NAME |
+------------------------+
| latin2_general_ci      |
+------------------------+
1 row in set (0.000 sec)

So the encoding and character comparisons are the same.

On the VPS I made:
mysqldump --default-character-set=latin2 --no-tablespaces > backup.sqlI have:
file backup.sql                                                                                                                                                                 
backup.sql: HTML document, ISO-8859 text, with very long lines (52729)


On the hosting I perform
mysql --default-character-set=latin2 < backup.sql
I don't understand where the problem is?
Please help.

I also performed "Convert database and data to UTF-8". After that, the posts show correctly, but the translation files don't show anymore (I think they are translation files). I downloaded from → https://download.simplemachines.org/index.php?archive;b=3;v=32 the Polish package, replaced it, but I still had incorrect letters in diacritical marks.
I would like to add that both machines are running PHP 5.6.

Kindred

In smf 1.1.x,you need to use separate utf8 language files after you convert the database to utf8...

Also 1.1.x is past end of life. You need to upgrade.
You also need to upgrade your php.

Both the forum and php have known security issues and the only fix is upgrading
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

thommen

I understand all this, but I want to stay with latin2. Why am I experiencing such complications?

Kindred

Well, the thing is...smf 1.1.x is past end of life.  There is no more support for it except to upgrade.

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

thommen

Why do two of the same environment (I think) with the same coding (MySQL) with the same version of PHP give different results? I'd like to understand this is why it happens.

Kindred

Not the same environment...
Probably different mysql versions...
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

thommen

Quote from: Kindred on May 29, 2024, 08:11:26 PMProbably different mysql versions...
That's right
VPS:
SELECT VERSION();
+-----------------+
| VERSION()       |
+-----------------+
| 5.5.62-0+deb8u1 |
+-----------------+
1 row in set (0.00 sec)


Hosting:
SELECT VERSION();
+-------------------------+
| VERSION()               |
+-------------------------+
| 10.6.17-MariaDB-cll-lve |
+-------------------------+
1 row in set (0.000 sec)

Now, how to reconcile the two? How to export the base? I am looking for a way to stay on latin2.

I've generally been able to convert latin2 → UTF-8 base and translation files, but that doesn't satisfy me because it's a shortcut. I want to possess the knowledge (to be able to) use it in the future.

Steve

Quote from: Kindred on May 29, 2024, 04:53:41 PMWell, the thing is...smf 1.1.x is past end of life.  There is no more support for it except to upgrade.
DO NOT pm me for support!

Kindred

Well, we're not here to debug the differences between mysql and mariadb versions.

Additionally, smf 2.1.x is ALWAYS  UTF8, There is no other choice - so. By upgrading,  you no longer have to worry about it anyway.


Upgrade smf to 2.0.19
Then Upgrade your php to 8.0
Then Upgrade smf to 2.1.4

This is (or close to it), realistically, your only path to continue using smf
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: