I have a file containing UTF-16 characters. I read in a file and can store characters either in the uint16_t array or in the char array (any better choice?)
But how can I print these characters?
I assume you want to print to stdout or stderr . One method is to use libiconv to convert from UTF-16 to UTF-32 (also known as UCS-4) character string ( wchar_t ). Then you can use wprintf and friends to print to standard streams.
stdout
stderr
wchar_t
wprintf
Source: https://habr.com/ru/post/1383700/More articles:why div position is not set properly - jqueryWhat is a key object (use in hashmap)? - javaHow to change / replace the parameter set file when creating from the command line? - delphipassing args as a reference to a pointer with (no) constness gives different addresses - c ++How to solve ViewExpiredException in JSF 1.2 - jsfHow to view Zend_Mail HTML code? - htmlHow to convert UTF-16 to UTF-32 and print the result of wchar_t in C? - cRails 3 - the jewel for storing and tracking changes - ruby-on-rails-3Need help using VBOs with Frustum Culling - javaEmpty ModelFormset in Django FormWizard - pythonAll Articles