unixman83
unixman83

Reputation: 9933

Convert output of Windows LPWSTR API's to UTF-8?

Pardon for my lack of knowledge in this area. Windows natively uses some type of multiple-byte encoding (Is it UTF-16?). Regardless, I am using a regular expression library that needs the output in UTF-8. What is the Windows API used to convert a standard 2-byte LPWSTR to UTF-8?

Upvotes: 1

Views: 582

Answers (1)

Windows programmer
Windows programmer

Reputation: 8065

WideCharToMultiByte and first argument CP_UTF8.

By the way, since English includes the pound sign, euro sign, etc., your language is affected as much as others are.

Upvotes: 2

Related Questions