Page 1 of 1

reading a unicode file with readfile

Posted: 09 Sep 2022 12:37
by MBaas
I wanted to copy the content of a file to the clipboard and ended up doing copytext readfile(<curitem>); which has worked fine for some time - until I came across a file containing unicode characters (sample attached, may need special font to be viewed in its original state):

Also tried with readfile(<curitem>,,65001) - that didn't work either.
OTOH, ::copytext "Abu Dschaʿfar Muhammad ibn Musa al-Chwārizmī (أبو جعفر محمد بن موسى الخوارزمی)" placed the unicode characters in the clipboard, so I guess that I'm making a mistake in my readfile call - or that there is a bug...

Re: reading a unicode file with readfile

Posted: 09 Sep 2022 12:46
by highend

Code: Select all

copytext readfile(<curitem>);
works fine for me with your demo text even in a fresh instance...

Re: reading a unicode file with readfile

Posted: 09 Sep 2022 13:42
by MBaas
Thanks - astonishing remote healing!
Suddenly I can't repo either :oops: