Ah, didn't know that. Thanks! Regards, Denis
On Sat, 2008-06-21 at 10:24 -0400, Jeff Johnson wrote: > On Jun 21, 2008, at 9:55 AM, Jeff Johnson wrote: > > > > > On Jun 21, 2008, at 5:15 AM, Denis Washington wrote: > >> > > As promised, here's certain issues I see in the current > > implementation. > > > > > The data type for Summary:/Description: is RPM_I18NSTRING_TYPE, > not RPM_STRING_TYPE. Basically that means that yo should not > use headerAddEntry(), but rather > > /** \ingroup header > * Add locale specific tag to header. > * A NULL lang is interpreted as the C locale. Here are the rules: > * \verbatim > * - If the tag isn't in the header, it's added with the passed > string > * as new value. > * - If the tag occurs multiple times in entry, which tag is > affected > * by the operation is undefined. > * - If the tag is in the header w/ this language, the entry is > * *replaced* (like headerModifyEntry()). > * \endverbatim > * This function is intended to just "do the right thing". If you need > * more fine grained control use headerAddEntry() and > headerModifyEntry(). > * > * @param h header > * @param tag tag > * @param string tag value > * @param lang locale > * @return 1 on success, 0 on failure > */ > /[EMAIL PROTECTED]@*/ static inline > int headerAddI18NString(Header h, int_32 tag, const char * string, > const char * lang) > /[EMAIL PROTECTED] h @*/ > > In this snippet: > > if (mf->pkgdisplayedname) > headerAddEntry(header, RPMTAG_SUMMARY, RPM_STRING_TYPE, mf- > >pkgdisplayedname, 1); > if (mf->pkgdescription) > headerAddEntry(header, RPMTAG_DESCRIPTION, RPM_STRING_TYPE, > mf->pkgdescription, 1); > > Nite that RPMTAG_GROUP is also RPM_I18NSTRING_TYPE if/when you get > around > to including. > > And also note that there are much deeper issues with I18N in *.rpm > packages. > > hth > > 73 de Jeff > ______________________________________________________________________ > RPM Package Manager http://rpm5.org > LSB Communication List rpm-lsb@rpm5.org ______________________________________________________________________ RPM Package Manager http://rpm5.org LSB Communication List rpm-lsb@rpm5.org