The Joomla! Forum ™






Post new topic Reply to topic  [ 24 posts ] 
Author Message
PostPosted: Fri Dec 16, 2005 6:22 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Oct 06, 2005 10:30 pm
Posts: 177
Location: Toronto, Ontario, Canada
I have a site in French and used the French language package to translate the components and everything else....
Now....the issue is actually with the content items....when I add text in French I get weird symbols whenever there's a word with accents although the footer shows the correct text That is using the Western encoding. If I use the Unicode encoding on my browser then all content shows ok but the footer shows the weird symbols...
What is worg with this site?
the address is:
http://www.uc-baby.com/qcfr/

Thanks for any help,

FayeC

_________________
Flavia Silveira
Joomla! Marketing, Joomla! Bug Squad, Joomla! Evangelist
http://FlahDesign.com | http://twitter.com/FlahDesign


Top
 Profile  
 
PostPosted: Fri Dec 16, 2005 9:52 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Sat Aug 20, 2005 9:19 am
Posts: 961
Location: Israel
Sounds like a mixture of encodings (possibly data was saved using one and displayed using another).

I checked the source of your site output in my browser and found that the encoding is not even set. The line shows as:

the end of the line should have been ... "text/html; charset=iso-8859-1"

This leads me to believe that the encoding in not inserted properly in your language file. i.e french.php. I suggest copying the required definition line from the original english.php file. The line to search for is the one that includes _ISO.

Hope this helps :-).

_________________
David Gal
joomla.org.il


Top
 Profile  
 
PostPosted: Fri Dec 16, 2005 11:11 pm 
User avatar
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Thu Oct 06, 2005 10:30 pm
Posts: 177
Location: Toronto, Ontario, Canada
The only line I have in my French.php file that has ISO is:
/** templates/*.php */
DEFINE('_ISO','charset=iso-8859-1');
DEFINE('_DATE_FORMAT','l, F d Y');  //Uses PHP's DATE Command Format - Depreciated
And it had the iso-8859-1 already....
It still has the problem.
Any other possibility?

FayeC

davidgal wrote:
Sounds like a mixture of encodings (possibly data was saved using one and displayed using another).

I checked the source of your site output in my browser and found that the encoding is not even set. The line shows as:

the end of the line should have been ... "text/html; charset=iso-8859-1"

This leads me to believe that the encoding in not inserted properly in your language file. i.e french.php. I suggest copying the required definition line from the original english.php file. The line to search for is the one that includes _ISO.

Hope this helps :-).

_________________
Flavia Silveira
Joomla! Marketing, Joomla! Bug Squad, Joomla! Evangelist
http://FlahDesign.com | http://twitter.com/FlahDesign


Top
 Profile  
 
PostPosted: Sat Dec 17, 2005 12:09 am 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Sat Aug 20, 2005 9:19 am
Posts: 961
Location: Israel
The site needs to be in encoding ISO-8859-1 but it is now in utf-8. According to browser source. I see the following lines which show that the -ISO setting in the language file being used is set to utf-8.





I suggest the following:
- please make sure that the version you are using is a clean install (not an upgrade) of Joomla 1.0.4
- check that the encoding is not hard-coded in the template (as seen above) but rather looks like the following:
Code:
<?php $iso = split( '=', _ISO );
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />

the above code should be at the top of the template index.php file.

- if template is OK, enter the language manager in the backend and see which language file is published
- from the mangaer you can edit the language file. Go into the published file and search for _ISO and make sure it is not set to utf-8 but rather iso-8859-1

Hope this resolves it.

_________________
David Gal
joomla.org.il


Top
 Profile  
 
PostPosted: Fri Feb 17, 2006 3:21 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Feb 17, 2006 3:11 pm
Posts: 22
Hello !

I have the same problem with news feed. I checked the encoding of my site (it is in french), it is set in iso-8859-1:
http://www.macgraph.com/index.php

But the newsfeed page shows weird caracters:
http://www.macgraph.com/index.php?optio ... 5&Itemid=7

Any idea on how to get this corrected ?


Top
 Profile  
 
PostPosted: Fri Feb 17, 2006 9:31 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Sat Aug 20, 2005 9:19 am
Posts: 961
Location: Israel
carloff wrote:
Hello !

I have the same problem with news feed. I checked the encoding of my site (it is in french), it is set in iso-8859-1:
http://www.macgraph.com/index.php

But the newsfeed page shows weird caracters:
http://www.macgraph.com/index.php?optio ... 5&Itemid=7

Any idea on how to get this corrected ?


The source for the particular newsfeed may be encoded to utf-8. The unconverted extended ascii characters will display as garbage in a iso-8859-1 site.

"infograf768" has posted a small hack that can convert the incoming utf-8. It should not have an adverse effect on newsfeeds that are encoded as iso-8859-1.

See http://forum.joomla.org/index.php/topic,35552.0.html

_________________
David Gal
joomla.org.il


Top
 Profile  
 
PostPosted: Sat Feb 18, 2006 6:41 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 16630
Location: **Translation Matters**
In fact, we have to do it the other way and use utf8_decode instead of utf8_encode.
This will not have an adverse effect on ISO-8559-1 feeds (as far as I see) and change to ISO the utf-8 feeds.
See file below.


You do not have the required permissions to view the files attached to this post.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Sat Feb 18, 2006 5:21 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Sat Aug 20, 2005 9:19 am
Posts: 961
Location: Israel
If the source is encoded to utf-8 then it obviously needs to be decoded  (i.e. utf8_decode). There is no contradiction.

Quote:
The source for the particular newsfeed may be encoded to utf-8. The unconverted extended ascii characters will display as garbage in a iso-8859-1 site.

"infograf768" has posted a small hack that can convert the incoming utf-8. It should not have an adverse effect on newsfeeds that are encoded as iso-8859-1.

_________________
David Gal
joomla.org.il


Top
 Profile  
 
PostPosted: Sat Feb 18, 2006 5:51 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 16630
Location: **Translation Matters**
What I meant, David, and the reason why I posted this new hack, is that in this case (a site which is ISO-8559-1) what we want to do is to get every feed source reencoded to ISO-8559-1 (most are utf8 or ISO8559-1), thus the utf8_decode.

In the former case (a site that is utf8), we wanted the opposite, that is to get all feeds reencoded in utf8, thus the utf8_encode.
Right?
:)

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Sat Feb 18, 2006 6:06 pm 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Sat Aug 20, 2005 9:19 am
Posts: 961
Location: Israel
infograf768 wrote:
What I meant, David, and the reason why I posted this new hack, is that in this case (a site which is ISO-8559-1) what we want to do is to get every feed source reencoded to ISO-8559-1 (most are utf8 or ISO8559-1), thus the utf8_decode.

In the former case (a site that is utf8), we wanted the opposite, that is to get all feeds reencoded in utf8, thus the utf8_encode.
Right?
:)


You are absolutely correct J.M.

Case 1 - The receiving site is using utf-8 encoding:
                The conversion is from iso-8859-1 to utf-8 and the utf8_encode is used.
                This will have no adverse effect if the feed is already in utf-8.

Case 2 - The receiving site is using iso-8859-1 encoding:
                The conversion is from utf-8 to iso-8859-1 using utf8_decode.
                This will have no adverse effect if the feed is already in iso-8859-1

I understand that you have provided solutions for both cases. :)

_________________
David Gal
joomla.org.il


Top
 Profile  
 
PostPosted: Sun Feb 19, 2006 8:19 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 16630
Location: **Translation Matters**
Since then, it looks like Rey is working on it to make an universal file for 1.0.8  :)

(and it looks like this file will be backward compatible with 1.0.7)

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Sun Feb 19, 2006 8:57 am 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Sat Aug 20, 2005 9:19 am
Posts: 961
Location: Israel
infograf768 wrote:
Since then, it looks like Rey is working on it to make an universal file for 1.0.8  :)


Great news!
Looks like you are still young enough to become a developer. ;)

_________________
David Gal
joomla.org.il


Top
 Profile  
 
PostPosted: Sun Feb 19, 2006 9:27 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 16630
Location: **Translation Matters**
I am afraid not.
Rey has improved considerably on the whole matter and made it universal for php too.

A good "titillator" would be the accurate wording maybe... (if this word exist in English.) ;)

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Sun Feb 19, 2006 11:56 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Feb 17, 2006 3:11 pm
Posts: 22
infograf768 wrote:
In fact, we have to do it the other way and use utf8_decode instead of utf8_encode.
This will not have an adverse effect on ISO-8559-1 feeds (as far as I see) and change to ISO the utf-8 feeds.
See file below.


Thank you very much for the file. Strangely, it works for some feeds and not for others. For example:
http://www.macgraph.com/index.php?optio ... 1&Itemid=7
The title is ok, but not the description.

Have you an idea on how to get this corrected ?


Last edited by carloff on Sun Feb 19, 2006 12:55 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun Feb 19, 2006 6:33 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 16630
Location: **Translation Matters**
carloff wrote:
infograf768 wrote:
In fact, we have to do it the other way and use utf8_decode instead of utf8_encode.
This will not have an adverse effect on ISO-8559-1 feeds (as far as I see) and change to ISO the utf-8 feeds.
See file below.


Thank you very much for the file. Strangely, it works for some feeds and not for others. For example:
http://www.macgraph.com/index.php?optio ... 1&Itemid=7
The title is ok, but not the description.

Have you an idea on how to get this corrected ?


Ce flux est pratiquement fait d'html entities
J'ai une solution pour vous si votre serveur est en php5.
En php 4, la solution implique un hack sur plusieurs fichiers et cela devient trop compliqué à gérer.
Autrement, il vous faudra attendre Joomla! 1.0.8 où le problème est résolu.
(il n'y en a plus pour très longtemps  ;) )

Désolé.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Mon Feb 20, 2006 9:38 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Feb 17, 2006 3:11 pm
Posts: 22
infograf768 wrote:
carloff wrote:
infograf768 wrote:
In fact, we have to do it the other way and use utf8_decode instead of utf8_encode.
This will not have an adverse effect on ISO-8559-1 feeds (as far as I see) and change to ISO the utf-8 feeds.
See file below.


Thank you very much for the file. Strangely, it works for some feeds and not for others. For example:
http://www.macgraph.com/index.php?optio ... 1&Itemid=7
The title is ok, but not the description.

Have you an idea on how to get this corrected ?


Ce flux est pratiquement fait d'html entities
J'ai une solution pour vous si votre serveur est en php5.
En php 4, la solution implique un hack sur plusieurs fichiers et cela devient trop compliqué à gérer.
Autrement, il vous faudra attendre Joomla! 1.0.8 où le problème est résolu.
(il n'y en a plus pour très longtemps  ;) )

Désolé.


Mon serveur est en php5. Si la solution est simple à appliquer, c'est super. Sinon, je patiente un peu pour Joomla! 1.0.8. Merci pour votre aide.


Top
 Profile  
 
PostPosted: Mon Feb 20, 2006 10:34 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 16630
Location: **Translation Matters**
@carloff
here is the file.
for PHP5, site ISO8559-1


You do not have the required permissions to view the files attached to this post.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Mon Feb 20, 2006 1:16 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Feb 17, 2006 3:11 pm
Posts: 22
infograf768 wrote:
@carloff
here is the file.
for PHP5, site ISO8559-1


Thanks a lot for this new file. The text is now displayed correctly. But, the title not... Very strange. For example:
http://www.macgraph.com/index.php?optio ... 4&Itemid=7
The title should be: VIDÉO - À CÔTÉ DE LA PLAQUE

I hope Joomla 1.0.8 will fully handle this...


Top
 Profile  
 
PostPosted: Mon Feb 20, 2006 1:57 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 16630
Location: **Translation Matters**
Je ne suis pas sût que ce flux là soit présenté de façon convenable car il est encodé en Windows-1252...
Les fonctions utf8_encode et utf8_decode ne concernent que l'ISO-8559-1.

Vous devriez prévenir la source du flux que celui-ci est obsolete.
Voir: http://doc.domainepublic.net/php/doc.ph ... oding.html

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Mon Feb 20, 2006 2:11 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 16630
Location: **Translation Matters**
EDIT:

Pour PHP5, nous avons une solution:
remplacez dans le fichier la ligne 275 par

Code:
<?php echo str_replace(''', "'", utf8_decode($currChannel->getTitle())); ?>


au lieu de
Code:
<?php echo str_replace(''', "'", html_entity_decode($currChannel->getTitle())); ?>


Votre flux est ainsi traduit (ne me demandez pas pourquoi  ;) )

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Mon Feb 20, 2006 3:07 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Feb 17, 2006 3:11 pm
Posts: 22
:) Vous êtes génial ! Ça marche ! It works !

You deserve the title of king of Joomla ! Thank you very much.

Yves


Top
 Profile  
 
PostPosted: Sun Feb 26, 2006 2:38 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 16630
Location: **Translation Matters**
Tout ceci devrait donc être réglé avec la version 1.0.8

Merci de confirmer. ;)

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Tue Feb 28, 2006 8:56 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Feb 17, 2006 3:11 pm
Posts: 22
infograf768 wrote:
Tout ceci devrait donc être réglé avec la version 1.0.8

Merci de confirmer. ;)


J'ai effectué avec succès la mise à jour en 1.0.8. Il reste un seul problème avec MacGeneration: l'apostrophe dans certaines descriptions donne un point d'interrogation, par exemple:
http://www.macgraph.com/index.php?optio ... =7&lang=fr

Dans la news Apple Store fermé, les apostrophes sont correctes. Apparemment, ce sont des apostrophes droites ', et ce sont les apostrophes courbes ’ qui ne passent pas. Y a-t-il un code à rajouter dans la page newsfeeds.html.php ?


Top
 Profile  
 
PostPosted: Wed Mar 01, 2006 6:24 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 16630
Location: **Translation Matters**
Mac Generation fait de l'encodage en Windows-1252 ! Le comble.  :o
Et moi qui suis sur Mac depuis l'Apple IIc...

Il y a eu d'autres problèmes depuis la modification originelle qui résolvait le pb sur la 1.0.8 et les devs sont au courant.
Les fichiers concernés ne sont plus seulement le seul fichier précédent.
Dès que je sais quelque chose, je vous le fais savoir.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ] 



Who is online

Users browsing this forum: No registered users and 161 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group