Results 1 to 7 of 7
  1. #1
    Join Date
    Oct 2005
    Location
    Chicago, IL USA
    Posts
    1,549
    Plugin Contributions
    28

    Default Confused about foreign characters

    My client's site is used almost entirely in Sweden, so the default language is Swedish. The site is fine, the problem is the customer names and addresses often show up with invalid characters, see attached image, causing problems for shipments. The site uses iso-8895-1 character set (it's 1.3.9).

    Name:  shipping_address.gif
Views: 1175
Size:  1.0 KB

    I thought upgrading to 1.5.3 and converting to UTF-8 would fix this. The upgraded site, 1.5.3, now has character problems on the store front. The characters ö and ä display as ?

    The checked the source code and it is displaying in UTF-8, so why do the characters display incorrectly?

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,366
    Plugin Contributions
    87

    Default Re: Confused about foreign characters

    What collation is being used in your database? Something latin1_ or something utf8_? If the database is using a latin1_ type collation, then you should edit your two configure.php files and add the following statement to each (somewhere around the other database definitions):
    Code:
    define ('DB_CHARSET', 'latin1');

  3. #3
    Join Date
    Oct 2005
    Location
    Chicago, IL USA
    Posts
    1,549
    Plugin Contributions
    28

    Default Re: Confused about foreign characters

    When I do that, even more characters now mis-display (if that's a word).

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,366
    Plugin Contributions
    87

    Default Re: Confused about foreign characters

    Quote Originally Posted by jeking View Post
    When I do that, even more characters now mis-display (if that's a word).
    It is now!

    Let's start at the beginning. What collation is your database using? You can see this by using your cPanel's phpMyAdmin tool. When you select the database and view all the tables, each table that contains textual information will show a collation like latin1_swedish_ci or utf8_general_ci. When you use that tool to look at one of your mis-displayed product's raw information, do the funky characters show there?

  5. #5
    Join Date
    Oct 2005
    Location
    Chicago, IL USA
    Posts
    1,549
    Plugin Contributions
    28

    Default Re: Confused about foreign characters

    Cool, a new word exists...

    Collation is 'latin1_general_ci', so the answer would yes, I see 'funky characters'.

    With the db set as iso-8859-1, the store front is all good. Only customer entered data is funky...and that's the problem I am trying to address.

  6. #6
    Join Date
    Oct 2005
    Location
    Chicago, IL USA
    Posts
    1,549
    Plugin Contributions
    28

    Default Re: Confused about foreign characters

    Looking for some help on how to get Swedish characters to display correctly. The original problem was addresses entered by customers.

    Thanks,
    Jim

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,366
    Plugin Contributions
    87

    Default Re: Confused about foreign characters

    Check the following settings, where xxxxx is your current template directory:

    1. /includes/configure.php, /YOUR_ADMIN/includes/configure.php. DB_CHARSET set to latin1
    2. /includes/languages/xxxxx/english.php, swedish.php, /YOUR_ADMIN/includes/languages/english.php, swedish.php. CHARSET set to iso-8859-1
    3. /includes/languages/english.php, swedish.php, /YOUR_ADMIN/includes/languages/english.php, swedish.php. setlocale function is using an iso-8859-1 variant.

    Note that for the last files, you need to check in the non-template override versions of the language files. Since these files are loaded after your template-override versions, the values used in the setlocale function call for these files will take precedence.

 

 

Similar Threads

  1. Foreign characters in delivery address
    By waterbender in forum General Questions
    Replies: 4
    Last Post: 25 May 2013, 07:22 PM
  2. Foreign language characters gone funny
    By cloakvai in forum General Questions
    Replies: 3
    Last Post: 16 Feb 2010, 05:00 PM
  3. Yourpay issue with foreign multibyte characters
    By barco57 in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 8 Apr 2007, 05:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR