On Mon, Feb 28, 2005 at 01:25:43AM +0100, Marcin Owsiany wrote:
> Ah, so the issue is not that poedit performs some inappropriate
> recoding, but that $EDITOR decides to interpret a file containing just
> US-ASCII file as iso-8859-15, and not as UTF-8. But then after you input
> some non-us-ascii characters (which emacs encodes as iso-8859-15),
> poedit merges a UTF-8 and an iso-8859-15 file.

Exactly, sorry for having be so unclear.
 
> Since automagic detection of encoding (based just on the data) seems a
> very risky business, in order to perform a conversion, two things would
> be needed:
>  - a specification of the target encoding (could be easily retrieved
>    from the original po file Content-Type: header)
>  - a specification of the source encoding, i.e. "what encoding $EDITOR
>    chose to save your input in". I can't see how that could be done for
>    any editor in general.

I submitted the initial bug report because I (apparently erroneously)
thought that there was a way to specify, at the level of the filesystem,
what the encoding of a known file is. If there is none (as you seem to
imply), my point is indeed moot.
 
> However, I can see a third possibility, namely to have poedit prepend a
> Content-Type header, which would hopefully force $EDITOR into using
> correct (i.e. matching the initial po file) encoding for the following
> input.

That would indeed work.

> By the way, doesn't something like:
> 
> LC_CTYPE=fr_FR.UTF-8 poedit blah.po
> 
> provide a workaround? I guess that should force into using UTF-8 as the
> tempfile encoding..

That's more or less what I finally did. Unfortunately at that time my
ISO-8859 lines had already been appended...

-- 
Boris


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to