Re: I18N question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jan 12, 2007, at 4:30 PM, Jeszenszky Peter wrote:

Hello,

I'm working on a Java application that extracts package metadata from RPM
packages and transforms it to RDF, making RPM metadata available to
Semantic Web applications.

My question is about the RPMTAG_HEADERI18NTABLE header tag. The value of
this tag is a string array that has only one element ("C") in each RPM
package that I have seen. Is this I18N feature really supported in RPM- aware software? May I assume that every string in the header is encoded
in plain old US-ASCII?


RPMTAG_HEADERI81NTABLE stores the keys (i.e. locales) for an associative array of strings.

No RedHat package since RHL 6.2 has used the mechanism. What is done instead is to use a 2 level lookup of msgid's and msgstr's using dcgettext(). There are still distros that use locale's however, PLD being the first that comes to mind.

There are only 3 tags that ever used the associative array lookup:
    RPMTAG_SUMMARY
    RPMTAG_DESCRIPTION
    RPMTAG_GROUP

Meanwhile the much harder problem to solve is that strings in *.rpm
metadata have no well defined encoding. One cannot assume US-ASCII,
not UTF-8, nor LATIN1, nor anything else. Only '\0' terminated may be assumed.

In practice, the vast majority of the strings are US-ASCII however.

73 de Jeff

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux