News:

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

Main Menu

Chinese and other special characters.

Started by nolefan, April 22, 2007, 11:29:58 AM

Previous topic - Next topic

wtt

Hello Sarge, Thanks so much for your guide and I am sorry for my previous posts as I was a little bit freaking out. Anyway, any other folks would not encounter the same situation as me with your post here!

Quote from: Sarge on November 24, 2007, 10:26:19 PM
You don't have to post multiple times. If there's no reply after your last post, simply edit it.

Yes, it seems to be a Fantastico bug. It sets global_character_set as UTF-8 even if the tables are in latin1.

First, make a backup of your forum database. Then delete global_character_set from smf_settings (read reply #10 in this topic about how to do that). Then go to SMF Admin > Forum Maintenance and run "Convert the database and data to UTF-8?" -- SMF will convert the forum tables and set global_character_set to UTF-8.

Hello Sarge, I have done this to my database.
"DELETE FROM `smf_settings` WHERE `variable` = 'global_character_set' LIMIT 1;"
However, I found that it is not the solution for this problem.

Quote from: Sarge on July 06, 2007, 01:20:34 AM
Quote from: nolefan on June 29, 2007, 01:02:57 AM
Quote from: Sarge on June 28, 2007, 07:43:21 AM
Have you converted your forum with Admin > Forum Maintenance > "Convert the database and data to UTF-8"?

I don't have anything in the forums maintenance that says " Convert Database and data to UTF-8".

Have you tried deleting the entry global_character_set = UTF-8 in smf_settings and going to Admin > Forum Maintenance again? If you do that, the link I mentioned should appear.

Open phpMyAdmin (if you can access it for your hosted account), select your forum database and click on the SQL icon. It looks like this:



Enter the query (copy/paste from below) into the box and click the Go button.

DELETE FROM `smf_settings` WHERE `variable` = 'global_character_set' LIMIT 1;

The query above works if your forum tables prefix is smf_ (which is the default). You can find the exact prefix for your forum in Admin > Server Settings > Database Tables Prefix -- if it is different from smf_ then you have to modify the query before running it in phpMyAdmin.


[edit]
Also check the variables mentioned in this post:
http://www.simplemachines.org/community/index.php?topic=165442.msg1056581#msg1056581

Quote from: Sarge on November 24, 2007, 10:26:19 PM
You don't have to post multiple times. If there's no reply after your last post, simply edit it.

Yes, it seems to be a Fantastico bug. It sets global_character_set as UTF-8 even if the tables are in latin1.

First, make a backup of your forum database. Then delete global_character_set from smf_settings (read reply #10 in this topic about how to do that). Then go to SMF Admin > Forum Maintenance and run "Convert the database and data to UTF-8?" -- SMF will convert the forum tables and set global_character_set to UTF-8.

Bendigou( local shopping )
http://www.bendigou.com

Haoxiaoqu ( good districts )
http://www.haoxiaoqu.com

I am trying to link these two together!

Sarge

Quote from: Sarge on November 24, 2007, 10:26:19 PM
Then go to SMF Admin > Forum Maintenance and run "Convert the database and data to UTF-8?" -- SMF will convert the forum tables and set global_character_set to UTF-8.


    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

wtt

I knew that and I have done that successfully with your previous post. Cheers!
Bendigou( local shopping )
http://www.bendigou.com

Haoxiaoqu ( good districts )
http://www.haoxiaoqu.com

I am trying to link these two together!

Sarge


    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

wtt

Yes. I got that work before your last two posts. :)
Thanks a lot!

Quote from: Sarge on November 24, 2007, 10:55:50 PM
So, is it working OK now?
Bendigou( local shopping )
http://www.bendigou.com

Haoxiaoqu ( good districts )
http://www.haoxiaoqu.com

I am trying to link these two together!

polytalks

Quote from: Sarge on July 06, 2007, 01:20:34 AM
Quote from: nolefan on June 29, 2007, 01:02:57 AM
Quote from: Sarge on June 28, 2007, 07:43:21 AM
Have you converted your forum with Admin > Forum Maintenance > "Convert the database and data to UTF-8"?

I don't have anything in the forums maintenance that says " Convert Database and data to UTF-8".

Have you tried deleting the entry global_character_set = UTF-8 in smf_settings and going to Admin > Forum Maintenance again? If you do that, the link I mentioned should appear.

Open phpMyAdmin (if you can access it for your hosted account), select your forum database and click on the SQL icon. It looks like this:



Enter the query (copy/paste from below) into the box and click the Go button.

DELETE FROM `smf_settings` WHERE `variable` = 'global_character_set' LIMIT 1;

The query above works if your forum tables prefix is smf_ (which is the default). You can find the exact prefix for your forum in Admin > Server Settings > Database Tables Prefix -- if it is different from smf_ then you have to modify the query before running it in phpMyAdmin.


[edit]
Also check the variables mentioned in this post:
http://www.simplemachines.org/community/index.php?topic=165442.msg1056581#msg1056581

where can I find entry global_character_set = UTF-8 in smf_settings?? and which smf setting that you are regarding to?

thanks

Relyana

Brilliant ! This should be in "tips and tricks". You have no idea how long I searched for a fix to my problems with the Romanian diacritics (ok in preview, not ok in submitted posts). 

Thank you !!!  O:)

Sarge

Quote from: Sarge on November 24, 2007, 10:26:19 PM
... it seems to be a Fantastico bug. It sets global_character_set as UTF-8 even if the tables are in latin1.

Therefore, it's not really suitable for Tips and Tricks, because the issue does not happen when you upload SMF files by yourself and install SMF using install.php (not using an auto-installer like Fantastico).

We have contacted Netenberg, the developer of Fantastico. At the time of writing, we are still waiting for a response from them.

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Relyana

You're right, forgive my enthusiasm. My forum is no longer "connected" to Fantastico.  :)
The weird thing is that soon after I fixed the utf-8 character issue some of the posts disappeared .... I mean they were there in their threads but with no words or smileys or anything ... just blank posts. It didn't bother me though, they're gone for good now and everything's fine.   :D


Sarge

Quote from: Relyana on June 29, 2008, 03:58:48 PM
You're right, forgive my enthusiasm. My forum is no longer "connected" to Fantastico.  :)
The weird thing is that soon after I fixed the utf-8 character issue some of the posts disappeared .... I mean they were there in their threads but with no words or smileys or anything ... just blank posts. It didn't bother me though, they're gone for good now and everything's fine.   :D

Test with accented and other special characters (for example ä, 中文, " etc). If you still experience any issues, start a new topic (and post the topic link here).

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Relyana

Quote from: Sarge on June 30, 2008, 02:46:07 AM
Test with accented and other special characters (for example ä, 中文, " etc). If you still experience any issues, start a new topic (and post the topic link here).

Thanks Sarge but everything's perfect (or maybe it's just my proverbial luck.  :P )

smurfyforum

I am having this same problem - but I do not want to convert to UTF8, how do I solve this without converting?

"Smurfs, Smurfs, and More Smurfs!"

Sarge

Quote from: pvcblue™ on January 11, 2009, 02:18:14 AM
I am having this same problem - but I do not want to convert to UTF8, how do I solve this without converting?

What special characters are you having issues with?

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

smurfyforum

I have a member form finland and when he posts the apostrophies and stuff come out different characters, also like my user name here if I try to add the ™ to my name on my profile I get that error -

Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'like'
File: /home/mysite/public_html/mysite/forum/Sources/Subs-Members.php
Line: 904


"Smurfs, Smurfs, and More Smurfs!"

smurfyforum

oh line 904 in my subs-member says

      LIMIT 1", __FILE__, __LINE__);

"Smurfs, Smurfs, and More Smurfs!"

Sarge

Quote from: pvcblue™ on January 11, 2009, 02:56:34 AM
oh line 904 in my subs-member says

      LIMIT 1", __FILE__, __LINE__);

That's the last line of that query. Copy the lines before that (starting with the line that says db_query) and paste them here.

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

smurfyforum

ok here is the whole section



// Make sure they don't want someone else's name.
$request = db_query("
SELECT ID_MEMBER
FROM {$db_prefix}members
WHERE " . (empty($current_ID_MEMBER) ? '' : "ID_MEMBER != $current_ID_MEMBER
AND ") . "(realName LIKE '$checkName' OR memberName LIKE '$checkName')
LIMIT 1", __FILE__, __LINE__);
if (mysql_num_rows($request) > 0)
{
mysql_free_result($request);
return true;
}

// Does name case insensitive match a member group name?
$request = db_query("
SELECT ID_GROUP
FROM {$db_prefix}membergroups
WHERE groupName LIKE '$checkName'
LIMIT 1", __FILE__, __LINE__);
if (mysql_num_rows($request) > 0)
{
mysql_free_result($request);
return true;
}

// Okay, they passed.
return false;
}



"Smurfs, Smurfs, and More Smurfs!"

Sarge

Is line 904 before or after this:

// Does name case insensitive match a member group name?

???

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

smurfyforum

Quote from: Sarge on January 11, 2009, 03:38:59 AM
Is line 904 before or after this:

// Does name case insensitive match a member group name?

???

904 is before - that is line 911

"Smurfs, Smurfs, and More Smurfs!"

smurfyforum


"Smurfs, Smurfs, and More Smurfs!"

Advertisement: