Re: Forced utf-8 conversion???



Kaixo!

On Wed, Dec 27, 2000 at 07:16:57PM +0100, Christian Rose wrote:
 
> >> Right now, I'm suddenly *unable* to update the gedit sv.po file, because
> >> pablo was so kind to change it to utf-8 for me, and I don't have an utf-8
> >> editor on my system. Thanks.

Well, I added a new po file; then did a routine checking of po syntax
(msgfmt -c -v) and found that a lot of po files had syntax erros (a lot
of % formatter errors, some non matching \n, and incomplete headers).
So I fixed that, and at the time of commiting it I thought why not converting
them to UTF-8 as that had to be done anyway.

> > The situation is
> > 
> >   modules using GTK+2 should be using UTF-8 .po files and .desktop files,
> 
> However, I seriously doubt that gedit-HEAD is using GTK 2...

Well, I thought the gedit-HEAD was supposed to prepare for Gtk+ 2 (while
gedit stable is for current Gtk+ version).

>>   modules that aren't, should keep the existing things, with no
>>     exceptions.  If anyones been changing modules that are still using
>>     1.x to use UTF-8 .po files, they have probably been naughty.
> 
> Yes, to me, this seems to be the situation. Pablo, I'd really like to 
> have the utf-8 change on sv.po in gedit-HEAD reverted, unless there was 
> a really food reason to do the change. If there was, I'd like to hear 
> about it.

I sincerely thought as there was a distinct HEAD and stable branch they
were for Gtk+ 2 and current Gtk+; if I was wrong I apologize, and of course
I can revert the conversion of the po files.
(Note also that you can easily convert to/from a non UTF-8 charset with
a variety of tools: iconv from glibc >= 2.1, uniconv from yudit, etc.
maybe some lisp guru can make a few lines for emacs to add to the po-mode
so when loading a po file if there is a header with charset=utf-8
the proper call to iconv is done to convert the file on the buffer to
the charset of the user (that can be known by the shell command line
"locale charmap"); such few po lines will be of great help I suppose, as
the problem will become more and more present as the Great Switch to utf-8 has
started)

About the po files of gedit-HEAD tell me if I have to revert the changes
or not (if converting to UTF-8 was planned before the gedit-HEAD forks a
new stable branch I don't think it is needed to convert back). 


PS: the *.desktop and such are a more complicated problem (the charset of
the po files is not really a problem, as it seems automatic character
translation can be performed at display time); for those *.desktop and such
files no charset information is told; what would be needed is to decide of
a given date and make a version of gnome-libs (I suppose the code dealing
with them is on gnome-libs, I didn't looked at the sources) with a different
soname version, with the code displaying the translations on those files
enhanced so it assumes the strings are in UTF-8, request the charset used
by the user (there is a function in glibc for that), and, if needed,
call iconv() to do the conversion.
Of course, all *.desktop and such files of all Gnome programs should be
converted by that time (and doing a new complete Gnome realease would be
a good ocasion too). The task is a bit more complex as iconv can't be used
to convert simply the file, as it is a mix of different charsets; the
different lines have to be extracted, converted depending on language,
and concatened.
Having a list of the files needing conversion would help, with a small
notice "to do" or "done" in front of each one. 


Thanks for reading; and sorry again for my too quick conversion in gedit-HEAD


> 
> 
> Christian

-- 
Ki ça vos våye bén,
Pablo Saratxaga

http://www.srtxg.easynet.be/		PGP Key available, key ID: 0x8F0E4975




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]