News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Converting the forum to utf8

Started by pabloalcorta, April 10, 2020, 02:32:59 PM

Previous topic - Next topic

pabloalcorta

https://wiki.simplemachines.org/smf/UTF-8_Readme

hi Finally i am converting the forum to utf8
the doubt that I have how step 7 is done exactly what to do in the databases

7. Once all the UTF-8 language packs have been installed, convert the language settings of each user by running this query:



¿How running this query?

UPDATE smf_members
SET lngfile = CONCAT(lngfile, '-utf8')
WHERE lngfile != ''
8. In your Administration Center, change the defau


forum


Theme:Wgame
PHP: Version 7.0.33
SMF:2.0.17

Chen Zhen

Make sure to download a copy of your database prior to editing it directly.
You can do it in phpmyadmin or perhaps whatever database platform you use.

If you use phpmyadmin, log in and navigate to the database you are modifying.
Then you click on SQL (top left) and enter the following command in the input space:

UPDATE smf_members
SET lngfile = CONCAT(lngfile, '-utf8')
WHERE lngfile != ''

... make sure to change smf_ to your database prefix if it is different or just leave it if it's the same.
Then click on "GO" (bottom right).
It will say ok if it worked or error if you misunderstood the instruction and type something incorrect.

My SMF Mods & Plug-Ins

WebDev

SMF support staff should be shaping a positive community experience & not provoking an argument or emotional reaction.

shawnb61

^^^ What he said.

To get a sense if it is working, you can look at the data before & after, using this query:
SELECT distinct lngfile FROM `smf_members`;

Sample before & after queries attached.

Note that in all these queries you may need to substitute your DB's prefix for 'smf_' if appropriate.

A question worth asking is born in experience & driven by necessity. - Fripp

pabloalcorta

thanks  Chen Zhen, shawnb61

I did not do it, I had to restore the backup, the forum appeared blank ... and with the instructions they gave me, I try again in the morning


Theme:Wgame
PHP: Version 7.0.33
SMF:2.0.17

pabloalcorta

hello I have done the complete procedure and the forum is inaccessible it is blank
  I can use it after the procedure while I'm logged in
but when I log out I can't log in again

The first time I did it, I had an error loading language but I had not made the query, I restored the forum again

I went back to perform the entire procedure, it appeared later was





making the query you recommend shawnb61

before




after



thanks
Theme:Wgame
PHP: Version 7.0.33
SMF:2.0.17

Sir Osis of Liver

#5
Ok, you ran the query twice, it concatenated '-utf8' twice to each lngfile, including spanish_latin, which already had the suffix, so those fields are all buggered.  Easiest way to fix it is import your _members table from backup (you do have a backup, don't you?) and start over.

Think this will work -


UPDATE smf_members
SET lngfile = CONCAT(lngfile, '-utf8')
WHERE lngfile != '' AND
RIGHT(lngfile,5) != '-utf8';


Can someone check it?
When in Emor, do as the Snamors.
                              - D. Lister

Chen Zhen


My SMF Mods & Plug-Ins

WebDev

SMF support staff should be shaping a positive community experience & not provoking an argument or emotional reaction.

pabloalcorta

thanks Sir Osis of Liver Chen Zhen I will be testing overnight since every test I have I have to reset the entire backup if I import single database I get this error



during the night I will be trying what they say thank you very kind

Theme:Wgame
PHP: Version 7.0.33
SMF:2.0.17

Chen Zhen

#8
Perhaps some sort of overlap if partial import is enabled so just disable it or it might be a time out issue.
Have your host raise all the PHP limits that affect a database import unless you know how to do this yourself via your host control panel (ie. Cpanel, Webmin or Plesk).


memory_limit = 128M
post_max_size = 64M
upload_max_filesize = 60M
max_execution_time = 300


Also make sure to uncheck "Partial import" and try the import again from the start.

My SMF Mods & Plug-Ins

WebDev

SMF support staff should be shaping a positive community experience & not provoking an argument or emotional reaction.

pabloalcorta

thank you thank you thank you for your help I have been able to solve the problem for now everything seems to be working fine ... the move to utf8 finally went smoothly

many thanks  ;) Chen Zhen, Sir Osis, shawnb61




Theme:Wgame
PHP: Version 7.0.33
SMF:2.0.17

Advertisement: