On Thu, Jul 01, 2021 at 10:13:04AM +0300, Eli Zaretskii wrote: > It should work, although I'd prefer writing such code the other way > around: first create an uninitialized Lisp string (with > make_uninit_multibyte_string or make_uninit_string), then copy the > bytes while making the conversions. The reason for this preference is > that you could then make sure the produced string has the same > multibyte-ness as the original, whereas the way you did it relies on > whatever build_string decides, which is not necessarily the same. Thanks. I think the attached is doing what you suggested. -- Alan Third