Advertisement:

Author Topic: How to show Chinese Characters in an English Forum  (Read 32710 times)

Offline Sarge

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,209
  • Gender: Male
    • Zëri YT!
Re: How to show Chinese Characters in an English Forum
« Reply #20 on: November 23, 2008, 04:27:24 AM »
ETA: Read the other topic and basically that just says I have to convert my database to UTF-8 rather than just using the trick you use. I was hoping to avoid having to do the conversion.

No, you only need to do the conversion to UTF-8 if you need support for multiple languages, as agridoc mentioned:
It's a good solution for an old working forum or for ISO-8859-1 and another character set language, no need for database conversion. However, for true multilingual and many languages, UTF-8 is the proper solution.

If -- and only if -- your forum database tables are using the latin1 charset (and the latin1_swedish_ci collation by default) and your SMF installation is using UTF-8, there's still a problem here. You can fix this by deleting global_character_set as described in reply #10 in the other topic. (Be sure to select the forum database before going to the SQL box.) Whether you want to convert to UTF-8 afterwards or not... that's up to you. :) If you don't want to convert, then try agridoc's trick.
    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

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,224
  • Master of BBC Abuse
Re: How to show Chinese Characters in an English Forum
« Reply #21 on: November 23, 2008, 10:08:37 PM »
Just noting that I ran the query from the other thread and Agridocs's trick still doesn't work, so it looks like UTF-8 or nothing.

Yes, the installation is in UTF-8 and the database tables are in latin1_swedish_ci.

Offline Sarge

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,209
  • Gender: Male
    • Zëri YT!
Re: How to show Chinese Characters in an English Forum
« Reply #22 on: November 24, 2008, 01:57:36 AM »
Yes, the installation is in UTF-8 and the database tables are in latin1_swedish_ci.

How did you verify that the SMF installation is still in UTF-8?

The query removes global_character_set (which defaults to ISO-8859-1 if it's missing) from the smf_settings database table. But after that, you also need to switch the language from English_Utf8 to English in Admin > Server Settings > "Default Forum Language".

It's possible that you have two entries for English there, both named "English" (not "English" and "English_Utf8"). A quick way to know which to select could be to:

1. Select one of the English entries;
2. Look at the HTML source code of the page (View > Page Source in Firefox) and search for this:
Code: [Select]
option value="english"
3. See if that line is like this:
Code: [Select]
<option value="english" selected="selected">English</option>

If not, you need to select the "other" English.
    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

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,224
  • Master of BBC Abuse
Re: How to show Chinese Characters in an English Forum
« Reply #23 on: November 24, 2008, 02:09:51 AM »
Oh bother. Looks like I fluffed it. Server settings in SMF admin are plain English (have been for ages) but I thought you meant the display down in phpMyAdmin, which showed UTF-8.

I'll check the source code anyway and see what it says.

ETA: Yep, it's English alright.
« Last Edit: November 24, 2008, 02:15:10 AM by antechinus »

Offline Sarge

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,209
  • Gender: Male
    • Zëri YT!
Re: How to show Chinese Characters in an English Forum
« Reply #24 on: November 24, 2008, 03:06:21 AM »
Go to Admin > Forum Maintenance. In the General Maintenance section (at the top), what is the last link (the link after "Empty out unimportant logs.")? Is it "Convert the database and data to UTF-8" or is it "Convert HTML-entities to UTF-8 characters"?
    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

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,224
  • Master of BBC Abuse
Re: How to show Chinese Characters in an English Forum
« Reply #25 on: November 24, 2008, 03:27:27 AM »
It isn't either because after a little debacle a while ago I edited Admin.template.php to remove anything I didn't normally use and rearrange some of the others. :D

I can edit those links back in. Thing is at the moment I'm trying to train my co-admin to actually be a co-admin so I wanted the template fool proof. The link displayed used to be "Convert HTML-entities to UTF-8 characters". I imagine it still would be.

Offline Sarge

  • SMF Friend
  • SMF Hero
  • *
  • Posts: 6,209
  • Gender: Male
    • Zëri YT!
Re: How to show Chinese Characters in an English Forum
« Reply #26 on: November 24, 2008, 04:07:15 AM »
[...] I edited Admin.template.php to remove anything I didn't normally use [...]

Well, you can simply check out the links in the default (Core) theme, if that's not what you're currently using. Adding ?theme=1 to the forum URL (yourforum.com/index.php) should switch -- from the theme you (as admin) are using -- to Core temporarily.
    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

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,224
  • Master of BBC Abuse
Re: How to show Chinese Characters in an English Forum
« Reply #27 on: November 24, 2008, 04:11:46 AM »
I edited the default theme admin template because all the custom themes call that template anyway.
Like I said, I can undo the edits if necessary. I'll sort it tonight and see what shows up. No big deal.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,224
  • Master of BBC Abuse
Re: How to show Chinese Characters in an English Forum
« Reply #28 on: November 25, 2008, 01:20:59 AM »
Ok, done. It is now showing "Convert the database and data to UTF-8",
This is not the link that it used to show so obviously something has changed.

Offline helio l lopes

  • Semi-Newbie
  • *
  • Posts: 28
Re: How to show Chinese Characters in an English Forum
« Reply #29 on: December 12, 2008, 07:50:01 AM »
antechinus you can use UTF-8, otherwise you can "cheat" by changing the codepage in index.english.php to windows-1256 or ISO-8859-6.

In Multilingual in SMF 1.1RC2 without UTF for Greek and other languages? you can find more on this solution.


HI COMPUART,

My forum has the English by default but I would like that Czech users could be able to post and to see their characters as well.

I've tried the trick suggested by Agridoc but nothing works.

In phpAdmin I have the collation like this: latin1_general_ci.

Could you give a help on this, please?


Regards,

Helio