Re: Source code encoding detection modifications for intltool
Carlos Perelló Marín <[email protected]> 15 Jul 2003 13:26:12 +0200
| Newsgroups | gmane.comp.gnome.lib.xml.internationalization,gmane.comp.gnome.internationalization.general |
|---|---|
| Organization | GNOME Foundation |
| Message-ID | <[email protected]> |
--=-LrwrxAZBNbOCw5+H24V1 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable El mar, 15-07-2003 a las 12:54, Abel Cheung escribi=F3: > On 2003-07-14(Mon) 20:34:18 +0200, Carlos Perell=F3 Mar=EDn wrote: > > Hi, here you have a patch that tries to detect the file encoding used > > and then, calls xgettext with that encoding option. >=20 > 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) Well, if it's detected as an ASCII file, we can use without problems the UTF-8 encoding, the problem is if it detects it as an ISO-* because there are characters that are not valid UTF-8 characters... >=20 > 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. Ideas to "fix" it? Assume that all files are using UTF-8 is not the correct behavior... Cheers. >=20 > Abel >=20 > > 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* o= r > > 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 Carlos Perell=F3 Mar=EDn Debian GNU/Linux Sid (PowerPC) Linux Registered User #121232 mailto:[email protected] || mailto:[email protected] http://carlos.pemas.net Valencia - Spain --=-LrwrxAZBNbOCw5+H24V1 Content-Type: application/pgp-signature; name=signature.asc Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQA/E+TUEuPMamD5V9cRAuTqAJ435yZCLK9/i2zb+yIZy2f7sUVTpQCffALu HlOouQkTOqguUKAypqqYGLg= =wur2 -----END PGP SIGNATURE----- --=-LrwrxAZBNbOCw5+H24V1--