From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gunnar Horrigmo Newsgroups: gmane.emacs.bugs Subject: bug#20258: 24.5; format-time-string miscounting of multibyte characters Date: Sat, 04 Apr 2015 16:33:50 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1428161784 30262 80.91.229.3 (4 Apr 2015 15:36:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 4 Apr 2015 15:36:24 +0000 (UTC) To: 20258@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 04 17:36:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YeQ7H-0007Ez-AB for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Apr 2015 17:36:11 +0200 Original-Received: from localhost ([::1]:33464 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YeQ7G-0007p4-BI for geb-bug-gnu-emacs@m.gmane.org; Sat, 04 Apr 2015 11:36:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YeQ7C-0007oz-0B for bug-gnu-emacs@gnu.org; Sat, 04 Apr 2015 11:36:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YeQ77-000112-TQ for bug-gnu-emacs@gnu.org; Sat, 04 Apr 2015 11:36:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55071) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YeQ77-00010y-RQ for bug-gnu-emacs@gnu.org; Sat, 04 Apr 2015 11:36:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YeQ77-0007Eb-MR for bug-gnu-emacs@gnu.org; Sat, 04 Apr 2015 11:36:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Gunnar Horrigmo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Apr 2015 15:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 20258 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.142816170627737 (code B ref -1); Sat, 04 Apr 2015 15:36:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Apr 2015 15:35:06 +0000 Original-Received: from localhost ([127.0.0.1]:44847 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YeQ6D-0007DI-FJ for submit@debbugs.gnu.org; Sat, 04 Apr 2015 11:35:06 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41752) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YeP9E-0005k4-5S for submit@debbugs.gnu.org; Sat, 04 Apr 2015 10:34:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YeP97-0004Cn-9S for submit@debbugs.gnu.org; Sat, 04 Apr 2015 10:34:02 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:44462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YeP97-0004Cj-73 for submit@debbugs.gnu.org; Sat, 04 Apr 2015 10:34:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YeP96-0005sV-10 for bug-gnu-emacs@gnu.org; Sat, 04 Apr 2015 10:34:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YeP90-0004CJ-SM for bug-gnu-emacs@gnu.org; Sat, 04 Apr 2015 10:33:58 -0400 Original-Received: from mail-out4.uio.no ([129.240.10.15]:54696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YeP90-0004C2-FR for bug-gnu-emacs@gnu.org; Sat, 04 Apr 2015 10:33:54 -0400 Original-Received: from mail-mx1.uio.no ([129.240.10.29]) by mail-out4.uio.no with esmtp (Exim 4.80.1) (envelope-from ) id 1YeP8x-0000zT-Di for bug-gnu-emacs@gnu.org; Sat, 04 Apr 2015 16:33:51 +0200 Original-Received: from lumpy-gravy.uio.no ([129.240.203.134]) by mail-mx1.uio.no with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.80) (envelope-from ) id 1YeP8w-0004Lr-NW for bug-gnu-emacs@gnu.org; Sat, 04 Apr 2015 16:33:51 +0200 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-UiO-Ratelimit-Test: rcpts/h 1 msgs/h 1 sum rcpts/h 2 sum msgs/h 2 total rcpts 325 max rcpts/h 15 ratelimit 0 X-UiO-Spam-info: not spam, SpamAssassin (score=-5.0, required=5.0, autolearn=disabled, T_RP_MATCHES_RCVD=-0.01, UIO_MAIL_IS_INTERNAL=-5, uiobl=NO, uiouri=NO) X-UiO-Scanned: B463F1723C3B35D67698654ECB4D4EF1682C4B0B X-UiO-SPAM-Test: remote_host: 129.240.203.134 spam_score: -49 maxlevel 80 minaction 2 bait 0 mail/h: 1 total 318 max/h 6 blacklist 0 greylist 0 ratelimit 0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Sat, 04 Apr 2015 11:35:03 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:101189 Archived-At: As the subject says, format-time-string miscounts multibyte characters. Simple example with nb_NO.utf8 locale, where =C3=B8 is two bytes: (format-time-string "%6a" (date-to-time "Sat Apr 4 16:14:40 2015")) " l=C3=B8." (length (format-time-string "%6a" (date-to-time "Sat Apr 4 16:14:40 2015")= )) 5 Let me know if you need more info. --Gunnar In GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.14.10) of 2015-04-01 on lumpy-gravy.uio.no Repository revision: 1b70aa634c9ce117fed418894b54b1f2647bda1c Windowing system distributor `StarNet Communications Corp.', version 11.0.1= 4000 System Description: Fedora release 21 (Twenty One) Important settings: value of $LC_MONETARY: nb_NO.utf8 value of $LC_NUMERIC: nb_NO.utf8 value of $LC_TIME: nb_NO.utf8 value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Help Minor modes in effect: tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t line-number-mode: t transient-mark-mode: t Recent messages: nnimap read 417k from secure.runbox.no nnimap read 466k from secure.runbox.no nnimap read 581k from secure.runbox.no nnimap read 655k from secure.runbox.no nnimap read 729k from secure.runbox.no Mark set Mark saved where search started [2 times] Making completion list... Quit [4 times] Type C-x 1 to delete the help window, C-M-v to scroll help. Quit [2 times] Load-path shadows: /uio/kant/usit-gdw-u1/horrigmo/emacs/locate hides /uio/kant/usit-gdw-u1/hor= rigmo/emacs/src/emacs-24/emacs/lisp/locate Features: (shadow nnir emacsbug reposition sort smiley gnus-cite mm-archive mail-extr gnus-bcklg eieio-opt speedbar sb-image ezimage dframe find-func gnus-async qp gnus-ml disp-table pp gnus-eform debug jka-compr misearch multi-isearch help-mode gnus-topic nndraft nnmh utf-7 gnutls nnimap utf7 parse-time netrc network-stream starttls tls gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art mm-uu mml2015 nntp gnus-cache gnus-sum gnus-group gnus-undo nnfolder nnoo nnmail mail-source avoid mm-view mml-smime smime dig mailcap gnus-start gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems wid-edit nnheader rt-liberation edmacro kmacro browse-url markstack epa-file epa derived epg etags info smtpmail auth-source eieio byte-opt bytecomp byte-compile cl-extra cconv eieio-core gnus-util password-cache sendmail message cl-macs format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mailabbrev mail-utils gmm-utils mailheader ange-ftp comint ansi-color ring cl gv cl-loaddefs cl-lib package epg-config time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind gfilenotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) Memory information: ((conses 16 278530 45717) (symbols 48 32240 0) (miscs 40 185 563) (strings 32 55977 9185) (string-bytes 1 1975855) (vectors 16 32030) (vector-slots 8 1345064 168271) (floats 8 255 726) (intervals 56 14581 139) (buffers 960 37) (heap 1024 54088 6705)) --=20 Gunnar