[SOLVED] Rare characters in archives XML

A place to discuss Joomla! translation matters.

Moderator: wendhausen

Locked
User avatar
blues
Joomla! Explorer
Joomla! Explorer
Posts: 490
Joined: Fri Aug 19, 2005 3:14 pm
Location: Palafrugell (Girona)

[SOLVED] Rare characters in archives XML

Post by blues » Mon Jan 30, 2006 11:51 pm

I have translated the administration of Joomla in Spanish and appear rare characters solely in archives XML somebody it has algun advice or it knows where it could watch

Image

My System run:
mSQL: 4.0.25
PHP: 5.0.3
Webserver: Apache/2.0.52-CHS-1 (Unix)

Sorry for my english
Last edited by blues on Wed Feb 01, 2006 8:51 am, edited 1 time in total.
Josep M.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Rare characters in archives XML

Post by infograf768 » Tue Jan 31, 2006 6:28 am

Joseph
I guess you are talking about joomla! 1.0.7 and the screen capture is showing the weblink_category_table menu item editing.

Whatever the encoding you have chosen for your language.php file, it should be the same which displays on top of the xml file (and saved as such by your editor).
The default English administrator (any other admin language in the 1.0.x series is a hack) is:

Code: Select all

<?xml version="1.0" encoding="iso-8859-1"?>
It should also be the same encoding for the administrator template.

Hope it helps
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
blues
Joomla! Explorer
Joomla! Explorer
Posts: 490
Joined: Fri Aug 19, 2005 3:14 pm
Location: Palafrugell (Girona)

Re: Rare characters in archives XML

Post by blues » Tue Jan 31, 2006 7:42 am

Hi Jean-Marie,

That was what I verified first and is of the following way:
file of lenguaje.php:

Code: Select all

DEFINE('_ISO','charset=iso-8859-1');
administration template:

Code: Select all

<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>
archives xml:

Code: Select all

<?xml version="1.0" encoding="iso-8859-1"?>
I proved with the version Core of joomla without modifying solely changing to a file xml with accents and the result was same the rare characters in the file, despite all the other translated archives show the characters with accents correctly reason why it is impossible my to find the solution to this subject no longer I know that to prove more.

This problem reproduces solely in a server (I have 2) in the other whole is correctly:

PHP Version 5.0.3 shows to rare characters in xml
PHP Version 4.3.10 shows everything correctly

Thanks for your help
Josep M.

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19133
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: Rare characters in archives XML

Post by infograf768 » Tue Jan 31, 2006 3:14 pm

I checked here.
Same problem.
It looks like the params are passed in Ascii.

This is solved in 1.1 but does not help you much I guess.

EDIT: I am on PHP 5.0.4 and MySql 4.1.1.5
Last edited by infograf768 on Tue Jan 31, 2006 3:23 pm, edited 1 time in total.
Jean-Marie Simonet / infograf
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
davidgal
Joomla! Guru
Joomla! Guru
Posts: 963
Joined: Sat Aug 20, 2005 9:19 am
Location: Israel
Contact:

Re: Rare characters in archives XML

Post by davidgal » Tue Jan 31, 2006 5:18 pm

Hi blues,

Without trying to replicate and pinpoint the problem, there are two issues here that have a bearing on the problem.

1. The xml parsing library in Joomla can only handle regular ASCII characters (no extended characters such as acents etc.). In Joomla 1.1 there are no translations inside the xml - only language keys appear there and the tranlations are in the language ini file. (The keys are all ASCII)

2. There are known issues with PHP 5.0.3 - You might try 5.0.4 or 5.0.5
David Gal

User avatar
blues
Joomla! Explorer
Joomla! Explorer
Posts: 490
Joined: Fri Aug 19, 2005 3:14 pm
Location: Palafrugell (Girona)

[SOLVED] Rare characters in archives XML

Post by blues » Tue Jan 31, 2006 10:09 pm

solved 95%...

in administrator/components/com_menus/admin.menus.php

replace

Code: Select all

$name         = $element ? trim( $element->getText() ) : '';
by

Code: Select all

$name         = $element ? utf8_decode(trim( $element->getText() )) : '';
replace 

Code: Select all

$descrip 	= $element ? trim( $element->getText() ) : '';
by

Code: Select all

$descrip       = $element ? utf8_decode(trim( $element->getText() )) : '';
replace

Code: Select all

$group 		= $element ? trim( $element->getText() ) : '';
by

Code: Select all

$group       = $element ? utf8_decode(trim( $element->getText() )) : '';
in administrator/components/com_mambots/admin.mambots.php


replace

Code: Select all

$row->description = $element ? trim( $element->getText() ) : '';
by

Code: Select all

$row->description = $element ? utf8_decode(trim( $element->getText() )) : '';
in administrator/components/com_modules/admin.modules.php


replace

Code: Select all

$row->description = $element ? trim( $element->getText() ) : '';
by

Code: Select all

$row->description = $element ? utf8_decode(trim( $element->getText() )) : '';
in includes/joomla.xml.php


below line:

Code: Select all

$result[0] = mosToolTip( addslashes( $description ), $result[0], '', '', $result[0], '#', 0 );
add:

Code: Select all

$result[0] = utf8_decode($result[0]);
Fine run now whit accents :)
Last edited by blues on Wed Feb 01, 2006 5:57 pm, edited 1 time in total.
Josep M.


Locked

Return to “Translations”