No way Jose!

rpmbuild (and *.rpm metadata) can NOT have any encoding
assumed.

Encoding is for DISPLAY, not for octets.

Put unicode into package metadata at your own peril.

Meanwhile -- without an means to specify encoding in metadata --
rpm in C has *ONLY* 8 bit clean octet's and the usual conventions
for NUL terminated strings.

Until there's a well defined means of specifying encoding for all
tag strings -- and that's a fundamental design change to *.rpm packaging that
likely will NEVER happen -- the problem simply CANNOT be fixed to meet naive
luser expectations, and all attempts to "fix" anything
are just doomed.

C has octest, not utf8, and rpmdb strings are _NOT_ based on LC_ALL
and other i18n/l10n conventions.

You can of course put whatever garbage you wish into strings that
will be stored as keys in an rpmdb, subject to all the usual
GIGO conventions distro's wish to inflict upon their customers.

73 de Jeff


On Apr 5, 2011, at 3:29 PM, Per Øyvind Karlsen wrote:

>  RPM Package Manager, CVS Repository
>  http://rpm5.org/cvs/
>  ____________________________________________________________________________
> 
>  Server: rpm5.org                         Name:   Per Øyvind Karlsen
>  Root:   /v/rpm/cvs                       Email:  pkarl...@rpm5.org
>  Module: rpm                              Date:   05-Apr-2011 21:29:41
>  Branch: HEAD                             Handle: 2011040519294000
> 
>  Modified files:
>    rpm                     CHANGES build.c
> 
>  Log:
>    accept unicode characters.
> 
>  Summary:
>    Revision    Changes     Path
>    1.3601      +1  -0      rpm/CHANGES
>    2.125       +1  -1      rpm/build.c
>  ____________________________________________________________________________
> 
>  patch -p0 <<'@@ .'
>  Index: rpm/CHANGES
>  ============================================================================
>  $ cvs diff -u -r1.3600 -r1.3601 CHANGES
>  --- rpm/CHANGES      3 Apr 2011 22:58:05 -0000       1.3600
>  +++ rpm/CHANGES      5 Apr 2011 19:29:40 -0000       1.3601
>  @@ -1,4 +1,5 @@
>   5.4.0 -> 5.4.1:
>  +    - proyvind: rpmbuild: accept unicode characters.
>       - jbj: mongo: drag-in the test suite. grdfs/replica_sets todo++.
>       - jbj: mongo: and re-export the mongo-c-driver through librpmio.vers.
>       - jbj: mongo: pull in the gridfs methods from the mongo-c-driver too.
>  @@ .
>  patch -p0 <<'@@ .'
>  Index: rpm/build.c
>  ============================================================================
>  $ cvs diff -u -r2.124 -r2.125 build.c
>  --- rpm/build.c      10 Feb 2010 20:24:49 -0000      2.124
>  +++ rpm/build.c      5 Apr 2011 19:29:40 -0000       2.125
>  @@ -88,7 +88,7 @@
>           /*@switchbreak@*/ break;
>   /*@-boundsread@*/
>       default:
>  -        if (checking && !(isprint(*s) || isspace(*s))) return 0;
>  +        if (checking && !(isprint(*s) || isspace(*s)) && *(unsigned char 
> *)s < 32) return 0;
>           /*@switchbreak@*/ break;
>   /*@=boundsread@*/
>       }
>  @@ .
> ______________________________________________________________________
> RPM Package Manager                                    http://rpm5.org
> CVS Sources Repository                                rpm-...@rpm5.org

______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
Developer Communication List                        rpm-devel@rpm5.org

Reply via email to