Your message dated Thu, 9 Apr 2015 12:04:43 +0000 (UTC) with message-id <Pine.BSM.4.64L.1504091203300.20298@herc.mirbsd.org> and subject line Re: Bug#782225: mksh: parameter expansion: string length ${#parameter} is incorrect on multibyte character has caused the Debian Bug report #782225, regarding mksh: parameter expansion: string length ${#parameter} is incorrect on multibyte character 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 owner@bugs.debian.org immediately.) -- 782225: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782225 Debian Bug Tracking System Contact owner@bugs.debian.org with problems
--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: mksh: parameter expansion: string length ${#parameter} is incorrect on multibyte character
- From: Vincent Lefevre <vincent@vinc17.net>
- Date: Thu, 9 Apr 2015 13:44:20 +0200
- Message-id: <[🔎] 20150409114420.GA13174@ypig.lip.ens-lyon.fr>
Package: mksh Version: 50d-5 Severity: normal In UTF-8 based locales: $ mksh -c 'a=$(/usr/bin/printf \\u00e9); echo $a ${#a}' é 2 while POSIX says[*]: ${#parameter} String Length. The length in characters of the value of parameter shall be substituted. [*] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02 This the length in *characters*, not in bytes! So, the output should be "é 1" like with bash, ksh93 and zsh. -- System Information: Debian Release: 8.0 APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores) Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: sysvinit (via /sbin/init) Versions of packages mksh depends on: ii libc6 2.19-17 mksh recommends no packages. Versions of packages mksh suggests: ii ed 1.10-2 -- no debconf information
--- End Message ---
--- Begin Message ---
- To: Vincent Lefevre <vincent@vinc17.net>, 782225-done@bugs.debian.org
- Subject: Re: Bug#782225: mksh: parameter expansion: string length ${#parameter} is incorrect on multibyte character
- From: Thorsten Glaser <tg@mirbsd.de>
- Date: Thu, 9 Apr 2015 12:04:43 +0000 (UTC)
- Message-id: <Pine.BSM.4.64L.1504091203300.20298@herc.mirbsd.org>
- In-reply-to: <[🔎] 20150409114420.GA13174@ypig.lip.ens-lyon.fr>
- References: <[🔎] 20150409114420.GA13174@ypig.lip.ens-lyon.fr>
Vincent Lefevre dixit: >In UTF-8 based locales: >$ mksh -c 'a=$(/usr/bin/printf \\u00e9); echo $a ${#a}' tglase@tglase:~ $ mksh -c 'a=$(/usr/bin/printf \\u00e9); echo $a ${#a}' é 2 tglase@tglase:~ $ mksh -Uc 'a=$(/usr/bin/printf \\u00e9); echo $a ${#a}' é 1 This works as specified for mksh: UTF-8 mode is disabled by default in scripts or for -c to not break any existing scripts. bye, //mirabilos -- (gnutls can also be used, but if you are compiling lynx for your own use, there is no reason to consider using that package) -- Thomas E. Dickey on the Lynx mailing list, about OpenSSL
--- End Message ---