Page 1 of 1

How to read a unicode TXT file

Posted: Thu Mar 02, 2017 8:15 pm
by Jack
Hi,
What is the instruction to open a Unicode TXT file .

Thanks for your help .

Re: How to read a unicode TXT file

Posted: Fri Mar 03, 2017 1:47 am
by nageswaragunupudi
MemoRead() or any other file read function of (x)Harbour can read Unicode (utf-8) text file.

For display and edit Unicode text set FW_SetUnicode( .T. ). MemoEdit() and GET MEMO can edit and save Unicode text.

Code: Select all

   local cUnicodeText

   FW_SetUnicode( .t. )

   cUnicodeText   := MEMOREAD( "unicode.txt" )

   MEMOEDIT( cUnicodeText )