Your message dated Sun, 15 Feb 2009 14:03:32 +0000
with message-id <[email protected]>
and subject line Bug#504217: fixed in tree 1.5.2.2-1
has caused the Debian Bug report #504217,
regarding tree: Current locale not used to display file names
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
504217: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=504217
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: tree
Version: 1.5.2.1-1
Severity: normal
Tags: patch l10n

It seems that the current locale is not taken into account when displaying
file names:

% mkdir tmp
% touch tmp/eeeéee
% tree tmp
tmp
`-- eee\303\251ee

0 directories, 1 file

By examining the sources, my understanding is that setlocale(LC_CTYPE,
"") should be called *before* examining MB_CUR_MAX, otherwise it will
return 1 because the locale is set to "C" by default, as indicated
by setlocale(3):

"(...)
On  startup of the main program, the portable "C" locale is selected as
default.  A program may be made portable to all locales by calling:

    setlocale(LC_ALL, "");
(...)"

The attached patch works for me:

% ./tree tmp
tmp
`-- eeeéee

0 directories, 1 file

Best regards,

-Christian

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.26.5-mooch.1-amd64 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_US.UTF8)
Shell: /bin/sh linked to /bin/bash

Versions of packages tree depends on:
ii  libc6                         2.7-15     GNU C Library: Shared libraries

tree recommends no packages.

tree suggests no packages.

-- no debconf information
--- tree.c.orig	2008-11-01 19:18:07.000000000 +0100
+++ tree.c	2008-11-01 19:18:56.264797154 +0100
@@ -209,6 +209,8 @@
   dirs[0] = 0;
   Level = -1;
 
+  setlocale(LC_CTYPE, "");
+
 /* Until I get rid of this hack, make it linux/cygwin only: */
 #if defined (LINUX) || defined (CYGWIN)
   mb_cur_max = (int)MB_CUR_MAX;
@@ -216,8 +218,6 @@
   mb_cur_max = 1;
 #endif
 
-  setlocale(LC_CTYPE, "");
-
   memset(utable,0,sizeof(utable));
   memset(gtable,0,sizeof(gtable));
   memset(itable,0,sizeof(itable));

--- End Message ---
--- Begin Message ---
Source: tree
Source-Version: 1.5.2.2-1

We believe that the bug you reported is fixed in the latest version of
tree, which is due to be installed in the Debian FTP archive:

tree_1.5.2.2-1.diff.gz
  to pool/main/t/tree/tree_1.5.2.2-1.diff.gz
tree_1.5.2.2-1.dsc
  to pool/main/t/tree/tree_1.5.2.2-1.dsc
tree_1.5.2.2-1_i386.deb
  to pool/main/t/tree/tree_1.5.2.2-1_i386.deb
tree_1.5.2.2.orig.tar.gz
  to pool/main/t/tree/tree_1.5.2.2.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Florian Ernst <[email protected]> (supplier of updated tree package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sun, 15 Feb 2009 14:39:47 +0100
Source: tree
Binary: tree
Architecture: source i386
Version: 1.5.2.2-1
Distribution: unstable
Urgency: low
Maintainer: Florian Ernst <[email protected]>
Changed-By: Florian Ernst <[email protected]>
Description: 
 tree       - displays directory tree, in color
Closes: 440475 504217
Changes: 
 tree (1.5.2.2-1) unstable; urgency=low
 .
   * New upstream release. Thanks to Steve Baker for explicitely fixing
     + Current locale not used to display file name (Closes: #504217)
     + tree doesn't support 32 bit UIDs/GIDs (Closes: #440475)
   * debian/copyright: Update year
Checksums-Sha1: 
 5ba314b26e9f45f14506145640fe25760d501ef5 980 tree_1.5.2.2-1.dsc
 ebc99e61fb0e5d118b7f126072e7ec90166667d5 33993 tree_1.5.2.2.orig.tar.gz
 e2cc95e7d868069f8eac03225531db6f815cc2ad 4662 tree_1.5.2.2-1.diff.gz
 ac6d26c8ac11c203ad4f8499d15cd2bc8bbdcab0 30170 tree_1.5.2.2-1_i386.deb
Checksums-Sha256: 
 d0dabcc1f8db5bb27d8b5ab79150172982dfb7be2ca5fa99c5d2e31c5ea27e2e 980 
tree_1.5.2.2-1.dsc
 bfd4ceca156a9f20352c1b5d44312c5a223a7cac3480d6eaef46edadded7c539 33993 
tree_1.5.2.2.orig.tar.gz
 1d0593bad5260604ae3aadbd17119031598bd2ef5c7ae630953d75ff5acf6e14 4662 
tree_1.5.2.2-1.diff.gz
 cbc3ca5e39e7d32e85fef79218c6121064e3db9afc669f4a04dc68ded8a897d3 30170 
tree_1.5.2.2-1_i386.deb
Files: 
 5f0723a6c387ff958d14c172a8728239 980 utils optional tree_1.5.2.2-1.dsc
 a7731a898e2c0d7e422a57a84ffbb06c 33993 utils optional tree_1.5.2.2.orig.tar.gz
 cecf73e3c26f5487d1a6f82345280c6a 4662 utils optional tree_1.5.2.2-1.diff.gz
 4bad72fd9dcc7d2e8918c4c27231941e 30170 utils optional tree_1.5.2.2-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkmYG40ACgkQs3U+TVFLPnx/7ACfTxyOff2XEEVIWcRiz8H3cNu2
3MgAoIjlQhtR0vveeYrXP4RWD/O7ifKZ
=ZD8X
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to