Look at STRCONV() in VFP help. But in VFP6 this function doesn't have capability to convert to UTF-8, so you need MultiByteToWideChar & WideCharToMultiByte API.
I don't have an example for this so look at this link
i have solved the problem writting my own UTF8 encoding routine. It wasn't so hard.
func utf8encode( lcString )
local lcUtf, i
lcUtf = ""
for i = 1 to len(lcString)
c = asc(substr(lcString,i,1))
if c < 128
cUtf = cUtf+chr(c)
else
cUtf = cUtf+chr(bitor(192,bitrshift(c,6)))+chr(bitor(128,bitand(c,63)))
endif
next
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.