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
Re: ability to define DB_CHARSET ?
Quote:
Originally Posted by
stromboli
I didnīt have a problem with special caracters until yesterday
... Then the solution will be found in something you did yesterday.
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:wink:
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.
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?
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.
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:wacko:
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.
Re: spanish accents show up as �
Quote:
Originally Posted by
DrByte
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.
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.