|
From: | Emanuel Berg |
Subject: | Re: Replacement for string-as-unibyte function |
Date: | Sun, 31 Jan 2021 03:40:46 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Joe Riel wrote: > As of 26.1, string-as-unibyte is deprecated. The suggested > replacement is encode-coding-string. What coding-system > should be passed to that function to get the > equivalent result? Good question! That should be improved in the docstring! No idea actually ... (let ((multibyte-string (string-to-multibyte "Test string.\n"))) (string= (string-as-unibyte multibyte-string) (encode-coding-string multibyte-string 'utf-8-unix) )) ; t -- underground experts united http://user.it.uu.se/~embe8573 https://dataswamp.org/~incal
[Prev in Thread] | Current Thread | [Next in Thread] |