Re: Source code encoding detection modifications for intltool
Abel Cheung <[email protected]> Tue, 15 Jul 2003 18:54:34 +0800
| Newsgroups | gmane.comp.gnome.internationalization.general,gmane.comp.gnome.lib.xml.internationalization |
|---|---|
| Message-ID | <[email protected]> |
--7qSK/uQB79J36Y4o Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2003-07-14(Mon) 20:34:18 +0200, Carlos Perell=C3=B3 Mar=C3=ADn wrote: > Hi, here you have a patch that tries to detect the file encoding used > and then, calls xgettext with that encoding option. An unexpected failure -- currently escaped hex values (\x??) are not handled. Source code with such strings should most likely use --from-code=3DUTF-8 too, but "file" detects them as either ASCII or ISO-* files. (mlview/src/mlview-app.c for example) It's not easy to determine what encoding is represented by escaped hex values -- it can be UTF-8, or can be something else, though it's most likely UTF-8 in GNOME 2.x software. Abel > Please, test it and review it I have no idea about perl so my change > it's mainly a cut & paste fix >=20 > I will also prepare a gettext >=3D 0.12 check so new intltool releases > will require it to be able to deal with UTF-8 source files. >=20 > Some comments. I get the file encoding with the "file" command and thus, > I'm not able to know the XML and yacc files encoding, so I'm assuming > that XML files are UTF-8 and any other file that it's not UTF-8, ISO* or > XML is ASCII >=20 > Comments, ideas? >=20 > I will apply this patch to my intltool installation so the status pages > will start to use it. --=20 Abel Cheung Linux counter #256983 | http://counter.li.org GPG Key: (0xC67186FF) | http://deaddog.org/gpg.asc Key fingerprint: 671C C7AE EFB5 110C D6D1 41EE 4152 E1F1 C671 86FF --7qSK/uQB79J36Y4o Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/E91pQVLh8cZxhv8RAvmwAKDT6MNH5kwxBWJVv1BDkW/QyCTDbQCg6m28 H0koF7KLTN172/sXRIMeAv0= =znJk -----END PGP SIGNATURE----- --7qSK/uQB79J36Y4o--