From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Benjamin Riefenstahl Newsgroups: gmane.emacs.bugs Subject: bug#31679: 26.1; detect-coding-string does not detect UTF-16 Date: Fri, 01 Jun 2018 21:40:32 +0200 Message-ID: <87efhq47nz.fsf@justinian.i-did-not-set--mail-host-address--so-tickle-me> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1527884829 8515 195.159.176.226 (1 Jun 2018 20:27:09 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 1 Jun 2018 20:27:09 +0000 (UTC) To: 31679@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jun 01 22:27:04 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOqdc-00025s-Av for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Jun 2018 22:27:04 +0200 Original-Received: from localhost ([::1]:57405 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOqfh-00074l-PE for geb-bug-gnu-emacs@m.gmane.org; Fri, 01 Jun 2018 16:29:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOqfb-00074T-DF for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 16:29:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOqfW-0008Fz-BQ for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 16:29:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50309) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOqfW-0008Fa-5w for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 16:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fOqfV-0001rM-Ui for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 16:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Benjamin Riefenstahl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Jun 2018 20:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 31679 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.15278849347133 (code B ref -1); Fri, 01 Jun 2018 20:29:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 1 Jun 2018 20:28:54 +0000 Original-Received: from localhost ([127.0.0.1]:58206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOqfN-0001qz-Sz for submit@debbugs.gnu.org; Fri, 01 Jun 2018 16:28:54 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:36605) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fOqfM-0001qk-4e for submit@debbugs.gnu.org; Fri, 01 Jun 2018 16:28:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOqfF-0007Ab-Q3 for submit@debbugs.gnu.org; Fri, 01 Jun 2018 16:28:46 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:35953) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fOqfF-00079u-Mm for submit@debbugs.gnu.org; Fri, 01 Jun 2018 16:28:45 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOqfE-0006wz-AJ for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 16:28:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOqf9-0006p9-8m for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 16:28:44 -0400 Original-Received: from odoacer.turtle-trading.net ([217.91.34.180]:49283) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOqf8-0006ca-U1 for bug-gnu-emacs@gnu.org; Fri, 01 Jun 2018 16:28:39 -0400 Original-Received: from justinian.turtle-trading.net ([192.168.2.118]) by odoacer.turtle-trading.net with esmtp (Exim 4.80) (envelope-from ) id 1fOpub-0000VH-1l; Fri, 01 Jun 2018 21:40:33 +0200 Original-Received: from benny by justinian.turtle-trading.net with local (Exim 4.84_2) (envelope-from ) id 1fOpua-0001DT-Uy; Fri, 01 Jun 2018 21:40:32 +0200 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:146833 Archived-At: I have been trying this (in real life the strings are often longer, of course): (detect-coding-string "h\0t\0m\0l\0") And I was surprised that this does not detect UTF-16 but instead gives (no-conversion). The result of (coding-system-priority-list) is (utf-8 iso-2022-7bit iso-latin-1 iso-2022-7bit-lock iso-2022-8bit-ss2 emacs-mule raw-text iso-2022-jp in-is13194-devanagari chinese-iso-8bit utf-8-auto utf-8-with-signature utf-16 utf-16be-with-signature utf-16le-with-signature utf-16be utf-16le japanese-shift-jis chinese-big5 undecided) Does this just not work, or am I doing something wrong? Thanks, benny Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. next-line: End of buffer (no-conversion) Quit [2 times] Type C-x 1 to delete the help window. Mark set delete-backward-char: Text is read-only Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM GSETTINGS NOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11 THREADS LCMS2 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cl-extra help-fns radix-tree help-mode easymenu cl-loaddefs cl-lib term/xterm xterm time-date elec-pair mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded 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 inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 8 102532 5281) (symbols 24 20919 1) (miscs 20 38 212) (strings 16 29808 1314) (string-bytes 1 767826) (vectors 12 12354) (vector-slots 4 470678 7618) (floats 8 56 559) (intervals 28 260 1) (buffers 536 12) (heap 1024 30861 580))