[pmwiki-users] translation difficulties

Petko Yotov 5ko at 5ko.fr
Mon Dec 27 19:14:34 CST 2010


On Monday 27 December 2010 12:19:14, Peter Bowers wrote :
> I'm in process of translating PmWiki into shqip and having some
> difficulties with special characters.
...
> Obviously this has something to do with character sets and the whole UTF-8
> thing, but I'm kind of hazy on this whole area...

Sigh. Indeed I should improve this. :-(

On pmwiki.org and on a clean default installation, if you haven't called 
xlpage-utf-8.php, and if you haven't loaded an XLPage defining an encoding, 
then Latin-1 is assumed and used.

So, when you are about to create the XLPage and paste your special characters 
that are outside of the Latin-1 charset, Mozilla browsers submit them as 
unicode HTML-entities. (I'm not sure what other browsers do: if they submit 
your text characters, they may well become question marks when saved.)

But when you save the page, if the page sets the utf-8 encoding then the next 
load is in utf-8. You no longer need HTML-entities, they are more difficult or 
even impossible to edit in non-latin languages.

Catch 22.

> (1) How *should* I have done the above?  Different order, different steps,
> what?

*You* shouldn't have to do it differently, *I* should fix it so that it 
doesn't behave this way. 

Currently you could edit the XLPage, set only the entry
    'xlpage-i18n' => 'utf-8',

save the page, and after that re-edit and fill in all the translations.

If a PmWikiXx/XLPage doesn't exist, pmwiki.org should now assume the UTF-8 
encoding which supports all characters from all languages.

> (2) How can I get the text from PmWikiSq/XLPage now that it's messed up?  I
> can copy/paste from my local copy, but if I didn't have that solution
> available what would I do then?

If pressing the "Back" button on your browser doesn't show the text area as 
you submitted it, it is likely that you have to re-type the page. :-)

Petko



More information about the pmwiki-users mailing list