reading a unicode file with readfile

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
MBaas
Posts: 710
Joined: 15 Feb 2016 21:08

reading a unicode file with readfile

Post 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...
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.14000 * F² * LinkTree

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: reading a unicode file with readfile

Post by highend »

Code: Select all

copytext readfile(<curitem>);
works fine for me with your demo text even in a fresh instance...
One of my scripts helped you out? Please donate via Paypal

MBaas
Posts: 710
Joined: 15 Feb 2016 21:08

Re: reading a unicode file with readfile

Post by MBaas »

Thanks - astonishing remote healing!
Suddenly I can't repo either :oops:
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.14000 * F² * LinkTree

Post Reply