Aug 04, 2017
06:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 04, 2017
06:03 AM
Hi,
We are working on a project that displays lots of different text in different languages. The supporting characters fit within UTF16 space and I am using wchar_t as my character type. I set the gcc and g++ command line option to -fshort-wchar to conserve memory (we have a lot of stored text strings in flash) but I get a lot of linker warnings regarding libraries using 4-byte wchar_t when my code is using 2-byte wchar_t (libg.a, libstdc++.a, etc.). Is there a set of DAVE libraries that support this?
I am going to guess the answer is 'no' and I would need to roll my own functions that use wchar_t. I am hoping for an answer before I go down this path....
Thanks,
Paul
We are working on a project that displays lots of different text in different languages. The supporting characters fit within UTF16 space and I am using wchar_t as my character type. I set the gcc and g++ command line option to -fshort-wchar to conserve memory (we have a lot of stored text strings in flash) but I get a lot of linker warnings regarding libraries using 4-byte wchar_t when my code is using 2-byte wchar_t (libg.a, libstdc++.a, etc.). Is there a set of DAVE libraries that support this?
I am going to guess the answer is 'no' and I would need to roll my own functions that use wchar_t. I am hoping for an answer before I go down this path....
Thanks,
Paul
- Tags:
- IFX
- wchar_t 2-byte
2 Replies
Aug 08, 2017
05:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 08, 2017
05:47 AM
Just a follow-up. I punted on the wchar_t approach and went with MBCS via utf8. It saves a bunch of storage space and the on-the-fly conversion is not a big hit in performance.
Aug 08, 2017
08:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aug 08, 2017
08:48 AM
DAVE is using the precompiled arm gcc standard libraries.
I found the following https://stackoverflow.com/questions/19489354/how-to-set-2-byte-wchar-t-output that may help you.
I found the following https://stackoverflow.com/questions/19489354/how-to-set-2-byte-wchar-t-output that may help you.