Unicodechar to char
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-07-17 10:55 PM - edited ‎2023-07-17 11:12 PM
How to change type from Unicodechar to char? I'm trying to pass char to model like this, but it only passes one character. What I am doing wrong?
- Labels:
-
TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-02 5:31 AM
Hello @heyo,
Based on the amount of information you have provided it's a bit difficult to judge, however, there are some functions that you can use to convert Unicode to char. For instance, you can use the wcstombs() function from the <cstdlib> header to convert a wide character string to a multibyte character string. Or using wstring_convert class from the <locale> header.
Hope this would help you.
ST Software Developer | TouchGFX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-08-02 6:26 AM - edited ‎2023-08-02 6:26 AM
As you have created this question in the TouchGFX forum, I assume you are using TouchGFX. Then you can use the function
Unicode::toUTF8(unicode, utf8, maxbytes)
provided by Unicode.hpp.
