[Top][All Lists]

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

installation on fedora core 2 - notes - libgettext-ruby-1.7.0 BUG

From: boud
Subject: installation on fedora core 2 - notes - libgettext-ruby-1.7.0 BUG
Date: Wed, 31 Jan 2007 19:36:17 +0100 (CET)

hi samizdat-devel,

i'm installing samizdat on a fedora core 2 system (not my fault!).

Generally things seem OK, though many of the small ruby libraries seem to be absent, so i added several of them in by compiling from source.

Here are a few notes. # (the comments are for comparison only)


RedCloth-3.0.4.tar.gz # source (deb stable: libredcloth-ru 3.0.3-2)

mod_ruby-1.2.6.tar.gz   # source  (deb stable: libapache-ruby 1.2.4-1)

libtidy-0.99.0-0 Getting libtidy-0.99.0-0.fdr.2.20040916.2.i386.rpm
Getting libtidy-devel-0.99.0-0.fdr.2.20040916.2.i386.rpm
# cf. debian stable: /usr/lib/

tidy-1.1.2.tar.gz         # source   (debian stable:  libtidy-ruby1. 1.1.2-2)

libdbi-ruby-0.0.23-2.tgz  # debian stable # --without=dbd_sybase,dbd_sqlite

libpgsql-ruby_0.7.1-10.tar.gz   # debian unstable  (deb stable: 0.7.1-3)

libgettext-0.8.0-1 (debian stable) required racc:
racc: cvs -d :pserver:address@hidden:/src co racc
      top of ChangeLog - Tue Nov  7 07:13:47 2006  Minero Aoki

LIBGETTEXT-1.7.0-1 vs 0.8.0-1 (yes, another gettext subtlety...)

Initially i tried:
libgettext-ruby-1.7.0-1.tgz  # debian unstable (deb stable: 0.8.0)

The following happens in this case.

The fr and es strings appear in the files seen by my browser as
ISO-8859-1 files, converted from UTF-8.  This might be OK for es/fr
users who hard-code their browsers into ISO-8859-1, even though the
language names of other languages would look horrible, but in any case,
it's rather silly when it's mixed in with non-ISO-8859-1 (latin-1) and if the user's browser does not *know* that the preferred coding is
latin-1. IMHO there's no reason not to stick to UTF-8.

Text strings for the other locales remain in UTF-8.

i can imagine that there's something "intelligent" in the system which
decides that UTF-8 is "unnecessary", and therefore converts from UTF-8
to ISO-8859-1 - but i couldn't find it.

Here's my attempt to trace the problem:

* POSTGRES: select datname, encoding from pg_database ;
  datname  | encoding
 samizdat  |        6

It seems to me that encoding=6 means UTF-8, but i didn't find where
this mapping is written.

* PO file: fr.po, es.po from cvs -> UTF-8

* MO file:, installed in fr/LC_MESSAGES/  etc.  -> UTF-8

* RUBY: ruby packages called by samizdat

attempted hack:
** ruby/lib/ruby/site_ruby/1.8/gettext/mo.rb   (remember: libgettext-1.7.0-1)

-  def = nil, output_charset = nil)
+  def = nil, output_charset = "UTF-8")
    result =

-> failed to solve the problem

** i assume that a version of the iconv library is used for this
conversion - but looking at gettext/iconv.rb and grepping a bit i couldn't
find where it happens

* FINAL RESULT: fr, es text strings in html file seen by browser -> ISO-8859-1

i uninstalled libgettext-1.7.0-1 and installed libgettext-0.8.0-1 and this solved the problem.

Downgrading can only be a temporary solution, since the bug will
return during a normal update of libgettext (present version 1.9.0)
unless it's understood and solved.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]