Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<blockquote> <p>I've been googling a little bit and found some wchar_t type, but there was not any simple example how to use it with files.</p> </blockquote> <p>Well met. There weren't any simple examples because, unfortunately, proper character set support <strong>isn't&nbsp;simple</strong>.</p> <p><em>Aside: In an ideal world, everybody would use UTF-8 (a Unicode encoding that is memory-efficient, robust, and backward-compatible with ASCII), the standard C library would include UTF-8 encoding-decoding support, and the answer to this question (and dealing with text in general) would be simple and straightforward.</em></p> <p>The answer to the question "<a href="https://stackoverflow.com/questions/114611/what-is-the-best-unicode-library-for-c">What is the best unicode library for C?</a>" is to use the <a href="http://site.icu-project.org/" rel="nofollow noreferrer">ICU</a> library. You may want to look at <a href="http://icu-project.org/apiref/icu4c/ustdio_8h.html" rel="nofollow noreferrer">ustdio.h</a>, as it has a <a href="http://icu-project.org/apiref/icu4c/ustdio_8h.html#afbed21b23ad994d4c4f83e4fe3e8a890" rel="nofollow noreferrer"><code>u_fgetc</code></a> function, and adding Unicode support to your program will probably take little more than typing <code>u_</code> a few times.</p> <p>Also, if you can spare a few minutes for some light reading, you may want to read <a href="http://www.joelonsoftware.com/articles/Unicode.html" rel="nofollow noreferrer">The Absolute Minimum Every Software Developer Absolutely, Positively Must Know about Unicode and Character Sets (No Excuses!)</a> from Joel&nbsp;On&nbsp;Software.</p> <p>I, personally, have never used ICU, but I probably will from now on :-)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload