Comment 0 for bug 11922

Revision history for this message
In , Eugeniy Meshcheryakov (eugen) wrote : patch for UTF-8 support

Package: dselect
Version: 1.10.20
Severity: normal
Tags: patch

  dselect does not support UTF-8 so I have prepared a patch (attached) to fix it.

What this patch do:
  - compile dselect with libncursesw5 instead of libncurses
  - calculate and use string widths in colums instead of sizes in bytes
    when needed (use standart C99 functions for this).
  - text wrapping code is too complicated for me to rewrite it, so i
    have used libtextwrap for that.

Problems:
  - textwrap hangs if string contains illegal symbols (in UTF-8), this
    is bug #237630. So debconf hangs while displaying description for
    some packages (doc-linux-text-pt -- is it a bug in this package
    too?).
  - text wrapping is different for some packages (manpages - is its'
    dsecription (indentation) correct?)
  - it does not display horisontal lines around section descriptions in
    linux terminal with KOI8-U encoding (but displays them in jfbterm
    and konsole and with UTF-8 encoding -- may be bug in libncursesw?)
  - some format strings was changed, requires new translations.

I have tested this patch with ru_RU and ja_JP locales. I have not found
other problems. Text with both languages looks same with different
encodings (KOI8-R and UTF-8 for Russian, EUC-JP and UTF-8 for Japanese).

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.4.25
Locale: LANG=uk_UA, LC_CTYPE=uk_UA

Versions of packages dselect depends on:
ii libc6 2.3.2.ds1-11 GNU C Library: Shared libraries an
ii libgcc1 1:3.3.3-2 GCC support library
ii libncursesw5 5.4-2 Shared libraries for terminal hand
ii libstdc++5 1:3.3.3-2 The GNU Standard C++ Library v3
ii libtextwrap1 0.1-1 text-wrapping library with i18n -

-- no debconf information