unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Evgeny Zajcev <lg.zevlg@gmail.com>
To: monnier@iro.umontreal.ca
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: user-ptr as image :data
Date: Fri, 15 Mar 2019 23:28:52 +0300	[thread overview]
Message-ID: <CAO=W_Zr6-+Bezq=uJDju89Ez2jN7A6mXjKmQzsymLuqG5jnQZQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 542 bytes --]

> Hmm... indeed we don't have any direct way to create a unibyte string.
> Can you `M-x report-emacs-bug` to request this new feature?
will do

> AFAICT while the string needs to have a NUL byte after its end,
> make_string should handle NUL bytes within the string, so the best
> option until a new primitive is provided is probably:

> 1- use make-string on your non-utf-8 binary data.
> 2- call encode-coding-string on the result (with utf-8 coding system).

This works! very slow, but it works, I'll use this hack for now

thanks

-- 
lg

[-- Attachment #2: Type: text/html, Size: 750 bytes --]

             reply	other threads:[~2019-03-15 20:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15 20:28 Evgeny Zajcev [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-03-15 19:14 user-ptr as image :data Evgeny Zajcev
2019-03-15 19:41 ` Stefan Monnier

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='CAO=W_Zr6-+Bezq=uJDju89Ez2jN7A6mXjKmQzsymLuqG5jnQZQ@mail.gmail.com' \
    --to=lg.zevlg@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).