Bug#297074: Temporary file created by poedit sould be of the same encoding as the file being edited

2005-03-01 Thread Boris Yakobowski
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]



Bug#297074: Temporary file created by poedit sould be of the same encoding as the file being edited

2005-02-27 Thread Marcin Owsiany
tags 297074 moreinfo
thanks

On Sat, Feb 26, 2005 at 11:07:28PM +0100, Boris Yakobowski wrote:
 When using poedit (typically by calling poedit file.po), an editor is
 invoked on a temporary file with the remaining strings to be translated. It
 would be great if this file was in the same encoding as file.po. On my box I
 edit english strings (which can be encoded in my default locale,
 iso8859-15), and I translate them into french, which should be in unicode in
 this case. Even if file.po is in unicode, the temporary file is iso8859.

As far as I know, potool knows nothing about encodings, so it should be
completly transparent to them, and just pass text from the po file in
whatever encoding it is, unchanged, to the temp file, and back. But I
may be wrong.

Could you provide an example file which could demonstrate this behavior?

regards,

Marcin
-- 
Marcin Owsiany [EMAIL PROTECTED] http://marcin.owsiany.pl/
GnuPG: 1024D/60F41216  FE67 DA2D 0ACA FC5E 3F75  D6F6 3A0D 8AA0 60F4 1216


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



Bug#297074: Temporary file created by poedit sould be of the same encoding as the file being edited

2005-02-27 Thread Boris Yakobowski
On Sun, Feb 27, 2005 at 11:26:06PM +0100, Marcin Owsiany wrote:
 As far as I know, potool knows nothing about encodings, so it should be
 completly transparent to them, and just pass text from the po file in
 whatever encoding it is, unchanged, to the temp file, and back. But I
 may be wrong.

Yes, but I find the current behavior unsatisfactory because it is the
responsibility of the user to set the correct encoding for the temporary
file. Otherwise it is appended as is, in an incorrect way; in my case emacs
saw the temporary file as an iso-8859-15 file (which was technically
correct), and then poedit merged it as is with the original utf8 po file. So
there are two ways to correct this in my opinion :
- the temporary file is created with the correct encoding
- the temporary file is converted after it has been saved, before being
merged.

Of course if poedit does not currently use encodings, this will be a bit of
work. But this bug is a wish after all :-)

 Could you provide an example file which could demonstrate this behavior?

I think just about anything would work ; besides it is highly locales and
emacs/whatever dependent unfortunately...

-- 
Boris


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



Bug#297074: Temporary file created by poedit sould be of the same encoding as the file being edited

2005-02-26 Thread Boris Yakobowski
Package: potool
Version: 0.5-2
Severity: wishlist

When using poedit (typically by calling poedit file.po), an editor is
invoked on a temporary file with the remaining strings to be translated. It
would be great if this file was in the same encoding as file.po. On my box I
edit english strings (which can be encoded in my default locale,
iso8859-15), and I translate them into french, which should be in unicode in
this case. Even if file.po is in unicode, the temporary file is iso8859.


-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.7
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages potool depends on:
ii  libc6   2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  libglib2.0-02.6.2-1  The GLib library of C routines

-- no debconf information


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