FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Convert file to UTF16
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Convert file to UTF16
Posted: Thu Dec 20, 2018 07:29 PM

There is a file in ANSI. I need to convert it to UTF16. How can I do this ?

Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: Convert file to UTF16
Posted: Fri Dec 21, 2018 07:07 PM
Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Convert file to UTF16
Posted: Fri Dec 21, 2018 08:20 PM

Thanks for your reply

hb_translate( cText, cPageOrigin, "UTF16LE" )

cPageOrigin - this is the source file encoding ?

Posts: 1195
Joined: Mon Oct 17, 2005 05:41 AM
Re: Convert file to UTF16
Posted: Sat Dec 22, 2018 09:56 AM

cPageOrigin is the coding of the source file. I use "cp850"

Regards,

Marc



FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite

Continue the discussion