Re: [poedit-users] Character encoding issue
Vaclav Slavik <[email protected]> Mon, 02 Feb 2009 09:32:42 +0100
| Newsgroups | gmane.editors.poedit.user |
|---|---|
| Message-ID | <1233563562.23548.15.camel@localhost> |
Hi,
On Sun, 2009-02-01 at 17:10 -0800, Scott Hildebrand wrote:
> I'm using poedit on Windows trying to do some French translations. In
> poedit when I type an é character, and save as UTF-8, it saves as é.
This sentence doesn't make any sense. UTF-8 is text encoding. As any
text encoding, it translates characters ("é") into *sequences of
numbers* ("C3 A9" in hexadecimal = "195 169" in decimal). Obviously,
"é" is not a sequence of numbers -- to say that UTF-8 encodes anything
into that, that's just talking nonsense.
Of course, what you meant (or should have meant) to say was that when
you open the .po file in some -- unspecified, despite bug reporting
guidelines asking for maximum specificity! --text editor, it shows up as
"é" in said editor. You make the unwarranted and entirely unreasonable
assumption that when two programs are involved in correctly handling
the .po file, it is Poedit -- the one of them that specializes in .po
files -- that got things wrong. This assumption is wrong.
You need to realize that *every time* a piece of text is stored in a
file, it is saved as sequence of numbers. In order to properly load the
text back, you need to know two pieces of information: said numbers
*and* knowledge of the *encoding* used to save them. This may be
implicit, or it may be stored somewhere in the file (as in the case
of .po files; this requires the app to understand the file's format!),
or you as the user may be required to provide this information.
So what happens here is that whatever tool you used to inspect the file
got the encoding wrong (this is not surprising, why should it know how
to deal with .po files?!). Specifically, it interpreted the file as if
it was stored in ISO-8859-1 or CP1252 encoding -- these happen to encode
the text "é" as "195 169", which should sound familiar to you if you
paid attention.
> Anybody have an idea how to make UTF-8 work and save correctly?
Poedit handles UTF-8 just fine. The problem is entirely on your side.
Regards,
Vaclav
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Poedit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/poedit-users
signature.asc
(application/pgp-signature, 197 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iEYEABECAAYFAkmGr6oACgkQxDYa/UZSZMnvigCeOfKAxe7T6SrjbUhHMocD2arL xXUAoIpK4+scibYIOnnwo+K5T18aWuM3 =oulN -----END PGP SIGNATURE-----