Is there a WinAPI function that can tell whether there is a non-latin character in BSTR?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I will presume that your question is really about whether there are characters in the string that require Unicode to represent, as opposed to ASCII. There are many Latin characters that can’t be represented in ASCII.
There’s no such function but it’s trivial to write your own. Just go through the string character by character and make sure each value is less than 128. If you find any greater than or equal to 128, those are Unicode characters.