News:

Wondering if this will always be free?  See why free is better.

Main Menu

Posted Characters coming up as "?" question marks

Started by gekk0, April 17, 2007, 01:33:16 AM

Previous topic - Next topic

gekk0

I'm using english UTF-8, and Chinese UTF-8 language sets on my forum,  and i'm having problems with some posted information being displayed as question marks like this:

门票:60rmb,包含一杯� �准饮料。

Also, sometimes 'nspb' appears too...does anyone know why this is happening / how to fix it?

Thanks

James

Sarge

It seems a character set and/or collation issue to me. This "garbled characters" issue can happen, for example, when your database is in UTF-8, database connection character set and client charset is UTF-8, but database tables and/or table data have a different charset (ISO-8859-1 for example). Incompatible PHP charsets and page encodings don't help either. As you can see, there are quite a few variables that affect how data will be displayed.

1. As a first step towards solving this problem, go to phpMyAdmin and click on "Show MySQL system variables":



Check charset and collation settings. Here's an example:



2. Did you select UTF-8 during SMF installation?

3. Select the database where SMF tables are installed and note what collation is used for each table:



Click on a table and see what collation is specified for each varchar, tinytext and text field:



4. Check the contents of phpinfo(), or at least the values for:

  • default_charset (in the PHP Core section)
  • HTTP_ACCEPT_CHARSET (in Apache Environment)
  • Accept-Charset (HTTP Headers Information)
  • _SERVER["HTTP_ACCEPT_CHARSET"] (PHP Variables)

Post your above settings here and I'll try to help you.

    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

Sarge

Hi, I'm browsing through older topics to see if they are resolved.

Have you been able to solve this issue? I found a solution that worked for another member with the same issue:
http://www.simplemachines.org/community/index.php?topic=166743.0

    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

tangch

Hi Sarge!

I have been following your post regarding the display of bad Chinese characters.
Well I'm having similiar problems (posted characters appearing as "?" question marks).
The difference is that my website is using Joomla (which is decoded with charset=UTF-8).
But I suppose your advice applies to most bad character issues if not all. In the following attached image you can see the character settings of my Joomla Database.



Do you think the different values are causing the bad character issue? Will a uniform value (UTF-8) correct the situation? Should I try changing all the values to UTF-8?

I look forward to your reply as this is an urgent issue to my website. Thanks in advanced.

Sarge

Quote from: tangch on December 01, 2007, 06:09:36 PM
The difference is that my website is using Joomla (which is decoded with charset=UTF-8).

Then by all means get a backup of your database from phpMyAdmin, and/or from the control panel of your hosting account (if it supports database backups.)

Quote from: tangch on December 01, 2007, 06:09:36 PM
But I suppose your advice applies to most bad character issues if not all.

No, this advice doesn't work for every issue related to character sets. It works for SMF installs that are marked as UTF-8 (there's no "Convert the database and data to UTF-8" in Admin > Forum Maintenance, but there's "Convert HTML-entities to UTF-8 characters") but the SMF tables and text fields are in latin1_swedish_ci. Otherwise, different approaches are needed.

Now, are you asking about 1) your Joomla! site, or 2) about your SMF forum integrated in Joomla?

    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

tangch

#5
Hi Sarge,

Thanks for your reply. Actually I'm using a SMF forum integrated in Joomla (Joomla 1.0.13 and JSMF Bridge 2.0.1 by JoomlaHacks). I have decided to use GB2312 encoding instead of UTF-8. So far I don't see bad characters anymore.

But I have got another problems.

1. When an attachment with a Chinese file name is attached to a post and saved, the file could not be downloaded. I get the Error 404 when trying to download it. Well it displays normally with the correct name in the post. Then I changed the Attachment Settings. I deselected the encrypt attachment option. Now the attachment with Chinese file name can be downloaded but the name has been change to some alphabets and not the original Chinese file name given. Is this a bug?

2. An immediate automatic user login is denied ("Login error. Please check your cookie settings") even though the default settings in the administration are used. I know this is caused by the JSMF Bridge but I can't afford to uninstall the bridge since there is no other choices.

Can you maybe shed some light on these issues? Thanks!

im1

Hi,

I recently changed the setting of my charset to 'english'. Im not sure what it was before.
One of my members username got changed, it added another character. So I wanted to change the name back but i got this error:

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

Do you know how i can resolve this?

Advertisement: