Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

characters changed(japanese)


hpqd09

Recommended Posts

Posted

characters changed to be irrecognizable because different coder or other reasons

www.hikkosu.cn is my site 。but ,i do it in local ,

I want to marry a foreigner

Posted

There are three places where character encoding must be in a form that accepts your alphabet (Kanji?) and all places must match each other (be consistent). You have

 

1) database -- most databases default to Latin-1 (Western European). You should be storing text data in UTF-8 (Unicode, which covers East Asian scripts).

 

2) language files for labels, prompts, headings, etc. -- make sure the ones you are using are UTF-8, and not written in some other encoding. Be careful if you prepare or edit language files on a PC which is using character encoding in some other character set, such as a Microsoft code page. When you upload them to your site, they may change their coding, or just display as garbage.

 

3) web page presentation -- the entire web page must tell the browser that it's in UTF-8. If it doesn't say anything, most web browsers will assume Latin-1 (ISO-8859-1). Any data that you enter into the system, as well as customer-input text, will be in UTF-8 encoding.

 

I said "UTF-8" in all cases, as it's widespread and consistent, but you could use any encoding you want, so long as it's consistently used across your store, your customer's browsers are likely to support it (have fonts to display it), and it supports the characters you want to use. For example, a site in Latin-1 is fine for English or Western European languages, but won't show CJK characters. Anyway, the key is to check for consistency.

 

I see your website is charset=iso-8859-1, which is Latin-1, on the English page. You won't be able to display Japanese (Kanji) or any other non-Western-European characters, nor will customers be able to type them in. Any Kanji text from language files or from the database will be trashed. If I switch over the Japanese page, I see it's listed as EUC-JP (another encoding). I don't know if the characters are correct; they only show up as boxes with 4-hex-digit codes (my system doesn't have any CJK fonts).

 

So, if you could be more specific about where you're having character problems, perhaps we can help you. Which text is not showing up correctly -- something coming out of the database, or something coming out of the language files? What is the character set encoding for the database (are English and Japanese sharing the same database?), under what encoding were the language files prepared, and do you know if the characters were translated (encoding changed) during upload? Are the different languages three different osC installations, or are they all sharing the same code and database?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...