Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2012
    Posts
    5
    Plugin Contributions
    0

    Default Scandinavian characters not being saved on product description

    I have a weird bug at the moment. Nothing is being saved through admin interface when updating product descriptions if you use a Scandinavian characters. Same seems to go for customer comments on order page. If you do not use Scandinavian characters (öäå, ÖÄÅ) then everything gets saved properly. There might be other pages that are affected by this too, just haven't found those yet. This has worked for more than two years now and no changes have been made to Zen Cart site for months. I don't know if the hosted server is updated or changes made to it. Could some update on hosted server side affect Zen Cart site?

    It probably has something to do with character set. Strange thing is that you can use Scandinavian characters on category description but not on the product description. If I edit the database directly with phpMyAdmin, it works as assumed. Scandinavian characters are saved and displayed correctly on the site and admin interface.


    Aah, just tested updating product description using English language on admin site. Text is being saved but the Scandinavian characters are being "scrambled". Is there some mismatch in encoding between database and site charset? Any help would be appreciated!


    ../admin/includes/languages/finnish.php
    // charset for web pages and emails
    define('CHARSET', 'iso-8859-1');

    ../admin/includes/languages/english.php
    // charset for web pages and emails
    define('CHARSET', 'utf-8');

    Zen Cart 1.5.0


    -Arsi

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,475
    Plugin Contributions
    88

    Default Re: Scandinavian characters not being saved on product description

    What collation is being used by your database? Use your web-host's phpMyAdmin to view the structure of various tables. The collation's name will be latin1_<something> if the database is using ISO encoding and utf8_<something> if it's using a form of utf8.

    Then check your /includes/configure.php and /YOUR_ADMIN/includes/configure.php files to see what your DB_CHARSET value is (it should match the collation value, either latin1 or utf8) that your database is using.

    Then, based on whether the database is latin1/utf8, you should set each of the language-display CHARSET values to match (an iso- flavor for a latin1 database and a utf8 flavor for a utf8 database).

  3. #3
    Join Date
    Jan 2012
    Posts
    5
    Plugin Contributions
    0

    Default Re: Scandinavian characters not being saved on product description

    @lat9

    Tables are all utf8_general_ci

    /YOUR_ADMIN/includes/configure.php
    define('DB_CHARSET', 'latin1');

    Thanks, I can now save descriptions with Scandinavian characters. Unfortunately it breaks my localized templates Scandinavian characters. I wonder why or how it has been working for this long...?


    Could I just convert my 'products_description' table to latin1_swedish_ci? Or the whole database? What could be the best way to fix this issue?

    http://stackoverflow.com/questions/1...-data-to-utf-8

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,475
    Plugin Contributions
    88

    Default Re: Scandinavian characters not being saved on product description

    Quote Originally Posted by Arsi View Post
    @lat9

    Tables are all utf8_general_ci

    /YOUR_ADMIN/includes/configure.php
    define('DB_CHARSET', 'latin1');

    Thanks, I can now save descriptions with Scandinavian characters. Unfortunately it breaks my localized templates Scandinavian characters. I wonder why or how it has been working for this long...?


    Could I just convert my 'products_description' table to latin1_swedish_ci? Or the whole database? What could be the best way to fix this issue?

    http://stackoverflow.com/questions/1...-data-to-utf-8
    Because your finnish-language files are using an ISO encoding, the show garbledefunk when displayed using utf8. I'm unaware of an "easy" ISO->UTF8 changing method, but you'll eventually want to make sure that each of your finnish language files are encoded using "UTF8 without BOM" (an easy setting to change in the Notepad++ editor) and update each of the 'funky' character-pairs with their UTF8 equivalent.

  5. #5
    Join Date
    Jan 2012
    Posts
    5
    Plugin Contributions
    0

    Default Re: Scandinavian characters not being saved on product description

    @lat9

    I need to evaluate how to do it. Thanks again for your help!

 

 

Similar Threads

  1. v139h Scandinavian characters not showing in order comments in admin
    By Dexter71 in forum General Questions
    Replies: 0
    Last Post: 7 May 2014, 02:17 PM
  2. Invoice not being saved...
    By LEDmod in forum General Questions
    Replies: 3
    Last Post: 5 Jul 2007, 01:37 PM
  3. Scandinavian characters messed up
    By ellivir in forum Upgrading from 1.3.x to 1.3.9
    Replies: 1
    Last Post: 6 Oct 2006, 06:24 AM
  4. Shipping values not being saved ?
    By dandownunder in forum Built-in Shipping and Payment Modules
    Replies: 8
    Last Post: 3 Jun 2006, 02:33 PM
  5. Session Not being saved
    By Czarest in forum General Questions
    Replies: 29
    Last Post: 24 May 2006, 02:57 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