Page 1 of 1
How to convert ANSI Windows UTF-8 to DOS encoding?
Posted: Sun Oct 22, 2017 8:05 am
by Eugene Lutsenko
How to convert ANSI Windows UTF-8 to DOS encoding?
ConvToOemCP() did not help
Re: How to convert ANSI Windows UTF-8 to DOS encoding?
Posted: Sun Oct 22, 2017 9:21 am
by Auge_Ohr
Eugene Lutsenko wrote:How to convert ANSI Windows UTF-8 to DOS encoding?
ConvToOemCP() did not help
you can try Xbase++
or ot4xb
Code: Select all
cAnsiToUtf8( cAnsi ) -> cUtf8
cUtf8ToAnsi(cUtf8) -> cAnsi
cOemToUtf8(cOem) -> cutf8
cUtf8ToOem(cUtf8) -> cOem
cSzWide2Ansi( <cUnicodeStr> ) -> cAnsiStr
cSzAnsi2Wide( <cAnsiStr> ) -> cUnicodeStr
Re: How to convert ANSI Windows UTF-8 to DOS encoding?
Posted: Sun Apr 04, 2021 9:32 am
by Eugene Lutsenko
What is Unicode clear, and what is Str2?
Unicode2Str()
Str2Unicode()
Re: How to convert ANSI Windows UTF-8 to DOS encoding?
Posted: Mon Apr 05, 2021 11:13 pm
by Piotr D
Unicode2Str() and Str2Unicode() is wrong way. Unicode is an UTF-16 string, not UTF-8.
Piotr
Re: How to convert ANSI Windows UTF-8 to DOS encoding?
Posted: Wed Apr 07, 2021 6:54 pm
by digitsoft
Functions do not work
Some Other Idea
Re: How to convert ANSI Windows UTF-8 to DOS encoding?
Posted: Wed Apr 07, 2021 6:57 pm
by digitsoft
Functions do not work
Some Other Idea
Re: How to convert ANSI Windows UTF-8 to DOS encoding?
Posted: Wed Apr 07, 2021 10:22 pm
by Wolfgang Ciriack
As Jimmy wrote, use ot4xb: ConvToOemCP(cUtf8ToAnsi(cUtf8))
Re: How to convert ANSI Windows UTF-8 to DOS encoding?
Posted: Thu Apr 08, 2021 6:45 am
by digitsoft
Thanks for answering Wolfgang Ciriack
but I have the same problem attached this the sample.

- UTF8.jpg (26.39 KiB) Viewed 11915 times
Re: How to convert ANSI Windows UTF-8 to DOS encoding?
Posted: Fri Jun 18, 2021 9:52 am
by PedroAlex
Nolberto Paulino,
Did you find a solution for UTF-8?
xBase have any function to do this conersion?