yamt commented on pull request #4881: URL: https://github.com/apache/incubator-nuttx/pull/4881#issuecomment-989603660
> > > > > > it seems a bit awkward to have x11 stuff in libc. is there a precedent? (in nuttx or other systems) > > > > > > > > > > > > > > > The following item depends on x11 key symbols: > > > > > ``` > > > > > 1. VNC server use it to encode the keyboard(mainlined) > > > > > > > > > > 2. We are adding sim x11 keyboard driver(developing) > > > > > ``` > > > > > > > > > > > > these use cases seem a bit low level. i'm not sure how wchar_t can be used there. > > > > > > > > > Here is the whole path: > > > ``` > > > 1. Keyboard driver report the event through x11 encoding > > > > > > 2. Upper half call https://github.com/apache/incubator-nuttx/blob/master/include/nuttx/input/kbd_codec.h with x11 definition > > > > > > 3. kdb convert x11->UTF32(xktowc) and UTF32->UTF8(wcrtomb) and save to the stream > > > ``` > > > > > > i feel it's still confusing to use wchar_t to mean utf32 even if we are going to define `__STDC_ISO_10646__`. > > Yes, from the standard perspective, whar_t could mean many different encoding(GB2312, JIS...), UTF32 is just one of them. But, all country agree to migrate to the Unicode encoding and other encoding become the legacy solution in today's software environment. If we consider the potential huge translation table for the different char encoding, Unicode is the best choice for embedding system. Actually, we are developing wchar_t conversion library which support only UTF8/UTF32. my point is that if it's about utf32, it's less confusing to name it so, not wchar_t. eg. `x11keysym_to_utf32` returning `uint32_t`, instead of `xbtowc` returning `wchar_t`. > > > how about following precedents like: https://xkbcommon.org/doc/0.2.0/group__keysyms.html#ga5fdd795b5799f131866cb1c5315af81f https://xkbcommon.org/doc/0.2.0/group__keysyms.html#ga198462d79271d614c43040595bbe2364 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
