Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  1. #1
    Join Date
    Jul 2010
    Posts
    7
    Plugin Contributions
    0

    help question spanish accents show up as �

    Hey Dr.Byte,

    as I see, you´ve able to help when it comes to this question.

    I´m running v1.3.9b. The shop has english and spanish as languages. I don´t think it´s a database charset problem because
    I didn´t have a problem with special caracters until yesterday, when I was working on some changes in the language/header.php and the tpl_header.php. possible that I touched language/index.php as well.
    I thought the problem could be in the spanish.php, but I replaced it with the original one from the language pack and then the spanish version goes blank!

    the problem is, that spanish accents show correctly in the english version but not in the spanish one. all accents show up as �.

    I´d appreciate any help.

    the site is: lanacional.tv/shop

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: ability to define DB_CHARSET ?

    Quote Originally Posted by stromboli View Post
    I didn´t have a problem with special caracters until yesterday
    ... Then the solution will be found in something you did yesterday.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jul 2010
    Posts
    7
    Plugin Contributions
    0

    Default Re: ability to define DB_CHARSET ?

    that´s what I thought. but what should I look for, what other then the charset can cause/alter it? i´m trying to fix it for hours and hours. I´m just hoping for any hint that helps me get this fixed

  4. #4
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: spanish accents show up as �

    The problem is a character set conflict.

    If you're talking about accents from product names/descriptions, then you've probably got your database set to latin1 but you've set your language charset to utf8, or vice-versa. Thus, the data is getting broken during translation. Change the character-set your browser uses to display, and you'll see the problem is resolved ... which confirms that you've got to get the data into your database in the same format that you're trying to output it.

    If you're talking about simple display text that's coming from language files, then you've got your language pack set to a different character set than what's being used in the browser to display it. Normally Zen Cart will tell the browser what character set you've selected in your language files. But if you've not set that correctly to match the content, or if you've got customizations that block Zen Cart's normal behavior, then of course that won't work. Again, check your browser's character-set display mode. Normally it should be set on Auto, but if you've set your browser it to only use a certain character set then nothing you do in Zen Cart will fix that.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Jul 2010
    Posts
    7
    Plugin Contributions
    0

    Default Re: spanish accents show up as �

    thanks for this explanation!

    that helped me to figure out the the spanish version is calling the utf-8 charset instead of the ISO-8859-1, which is the one that has worked and works for the english language pack too. now the strange thing is the in firefox the source code of the page shows me: charset=ISO-8859-1. why is it calling utf-8 when charset=ISO-8859-1 is defined in spanish.php as define('CHARSET', 'iso-8859-1');? or is there another file that overwrites the spanish.php?

  6. #6
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: spanish accents show up as �

    The code normally only ever listens to the main language file, ie: spanish.php. So it should be using whatever's set in your spanish.php file.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Jul 2010
    Posts
    7
    Plugin Contributions
    0

    Default Re: spanish accents show up as �

    well that´s exactly my problem. it is the same in english and spanish.php: define('CHARSET', 'iso-8859-1');
    spanish.php calls utf-8
    english.php calls iso-8859-1

    I´m stuck

  8. #8
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: spanish accents show up as �

    If you're going to use UTF8 characters in your spanish language files, then you need to set your spanish charset to utf-8. if you leave it as iso-8859-1 then you'll get those � symbols in your browser.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  9. #9
    Join Date
    Jul 2010
    Posts
    7
    Plugin Contributions
    0

    Default Re: spanish accents show up as �

    Quote Originally Posted by DrByte View Post
    If you're going to use UTF8 characters in your spanish language files, then you need to set your spanish charset to utf-8. if you leave it as iso-8859-1 then you'll get those � symbols in your browser.
    not in my case.

    spanish link: http://lanacional.tv/shop
    in firefox it tells me that it calls the utf-8 but when I change the browser to display iso-8859-1 it works and � are replaced with accents.

    english link: [URL="http://lanacional.tv/shop/index.php?main_page=index&language=en[/URL]
    firefox tells me that iso-8859-1 is called and even the accents work as you can see in the title of the murciélago product the é is displayed correctly, even though it is iso-8859-1.

  10. #10
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: spanish accents show up as �

    Right. So, that means the language files were edited and saved in iso-8859-1 format, and not in utf8 format.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 11 Jan 2016, 09:02 AM
  2. many ���� appears
    By jsarwar in forum Upgrading to 1.5.x
    Replies: 68
    Last Post: 20 Jul 2014, 07:22 PM
  3. Replies: 5
    Last Post: 2 Apr 2012, 05:21 PM
  4. [Done v2.0] spanish zones missing accents
    By torvista in forum Bug Reports
    Replies: 0
    Last Post: 26 Jul 2010, 08:14 AM
  5. Replies: 3
    Last Post: 13 Apr 2008, 08:47 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