Xbasic
convert_utf8_to_acp Function
Syntax
C CONVERT_UTF8_TO_ACP(utf8text as c)
Arguments
- utf8text
Character
Description
Convert utf8 encoded text to ascii.
Example
Convert data from UTF-8 to ansi code page.
dim cn as sql::connection ?cn.open("::Name::AADemo-Northwind") = .T. ?cn.Execute("select * from customers where customerId = 'BERGS'") = .T. rs = cn.ResultSet x = rs.data("CompanyName") ?x = "Berglunds snabbköp" ?convert_utf8_to_acp(x) = "Berglunds snabbköp" y = convert_utf8_to_acp(x) ?y = "Berglunds snabbköp" ?convert_acp_to_utf8(y) = "Berglunds snabbköp"
See Also