cancel
Showing results for 
Search instead for 
Did you mean: 

UTF-8?

BBlad.1
Associate II

Hi,

A colleague need to send me strings via Uart.

He asked me whether I work with UTF-8, and I was unable to find this information or how to configure it...

(I know that at the end of the day to display it I'll have to convert to Unicode).

Does anyone know?

I work with stm32l496g

Thank you

4 REPLIES 4

The UART can send any 8-bit values you want to send. What they represent is up to you. UTC-8 is just a superset of ASCII as I recall.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
BBlad.1
Associate II

yes, but is the 'unsgined char' c datatype encoded with utf-8?

that's what I can't find

Guess you'd need to look at the TouchGFX​ font mappings. C string functions are mostly agnostic, just expect NUL termination, and can work with control characters and extended characters.

Might need to check sort criterion.

Check compiler comand line options.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Alexandre RENOUX
Principal

Hello BBlad.1,

You are right, characters in a string in TouchGFX are considered as Unicode characters as 16-bit unsigned integers.

If you want to convert to UTF-8, you can call the functions fromUTF8() or toUTF8() that you can find in Unicode.hpp.

0693W00000KcRnGQAV.png/Alexandre