How to convert ANSI Windows UTF-8 to DOS encoding?

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

How to convert ANSI Windows UTF-8 to DOS encoding?

#1 Post by Eugene Lutsenko »

How to convert ANSI Windows UTF-8 to DOS encoding?
ConvToOemCP() did not help

User avatar
Auge_Ohr
Posts: 1405
Joined: Wed Feb 24, 2010 3:44 pm

Re: How to convert ANSI Windows UTF-8 to DOS encoding?

#2 Post by Auge_Ohr »

Eugene Lutsenko wrote:How to convert ANSI Windows UTF-8 to DOS encoding?
ConvToOemCP() did not help
you can try Xbase++

Code: Select all

Unicode2Str() 
Str2Unicode()
or ot4xb

Code: Select all

cAnsiToUtf8( cAnsi ) -> cUtf8
cUtf8ToAnsi(cUtf8) -> cAnsi

cOemToUtf8(cOem) -> cutf8
cUtf8ToOem(cUtf8) -> cOem

cSzWide2Ansi( <cUnicodeStr> ) -> cAnsiStr
cSzAnsi2Wide( <cAnsiStr> ) -> cUnicodeStr
greetings by OHR
Jimmy

User avatar
Eugene Lutsenko
Posts: 1649
Joined: Sat Feb 04, 2012 2:23 am
Location: Russia, Southern federal district, city of Krasnodar
Contact:

Re: How to convert ANSI Windows UTF-8 to DOS encoding?

#3 Post by Eugene Lutsenko »

What is Unicode clear, and what is Str2?

Unicode2Str()
Str2Unicode()

Piotr D
Posts: 129
Joined: Mon Jul 28, 2014 1:26 am
Location: Poznań, Poland

Re: How to convert ANSI Windows UTF-8 to DOS encoding?

#4 Post by Piotr D »

Unicode2Str() and Str2Unicode() is wrong way. Unicode is an UTF-16 string, not UTF-8.

Piotr

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: How to convert ANSI Windows UTF-8 to DOS encoding?

#5 Post by digitsoft »

Functions do not work
Some Other Idea
Nolberto Paulino
Regards

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: How to convert ANSI Windows UTF-8 to DOS encoding?

#6 Post by digitsoft »

Functions do not work

Some Other Idea
Nolberto Paulino
Regards

Wolfgang Ciriack
Posts: 478
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: How to convert ANSI Windows UTF-8 to DOS encoding?

#7 Post by Wolfgang Ciriack »

As Jimmy wrote, use ot4xb: ConvToOemCP(cUtf8ToAnsi(cUtf8))
_______________________
Best Regards
Wolfgang

User avatar
digitsoft
Posts: 451
Joined: Thu Jan 28, 2010 1:33 pm
Location: Republica Dominicana
Contact:

Re: How to convert ANSI Windows UTF-8 to DOS encoding?

#8 Post by digitsoft »

Thanks for answering Wolfgang Ciriack

but I have the same problem attached this the sample.
UTF8.jpg
UTF8.jpg (26.39 KiB) Viewed 7553 times
Nolberto Paulino
Regards

User avatar
PedroAlex
Posts: 229
Joined: Tue Feb 09, 2010 3:06 am

Re: How to convert ANSI Windows UTF-8 to DOS encoding?

#9 Post by PedroAlex »

Nolberto Paulino,

Did you find a solution for UTF-8?
xBase have any function to do this conersion?
Pedro Alexandre

Post Reply