From: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
To: 31679@debbugs.gnu.org
Subject: bug#31679: 26.1; detect-coding-string does not detect UTF-16
Date: Fri, 01 Jun 2018 21:40:32 +0200 [thread overview]
Message-ID: <87efhq47nz.fsf@justinian.i-did-not-set--mail-host-address--so-tickle-me> (raw)
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))
next reply other threads:[~2018-06-01 19:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-01 19:40 Benjamin Riefenstahl [this message]
2018-06-02 7:42 ` bug#31679: 26.1; detect-coding-string does not detect UTF-16 Eli Zaretskii
2018-06-02 13:55 ` Benjamin Riefenstahl
2018-06-02 14:24 ` Eli Zaretskii
2021-08-12 13:51 ` Lars Ingebrigtsen
2021-09-09 15:23 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87efhq47nz.fsf@justinian.i-did-not-set--mail-host-address--so-tickle-me \
--to=b.riefenstahl@turtle-trading.net \
--cc=31679@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).