Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can try system("cmd /c lambdabath") or system("lambdabath") as in the example:</p> <pre><code>//Save As UTF-8 withput BOM signature #include &lt;stdlib.h&gt; #include &lt;windows.h&gt; int main() { SetConsoleOutputCP(CP_UTF8); //system("cmd /c lambdabath"); system("lambdabath"); } </code></pre> <p>lambdabath.bat (also save as UTF-8 without BOM signature):</p> <pre><code>chcp 65001 echo Ιλιάδα </code></pre> <p>But if the question is: how to send international characters to windows console?<br> Then you can try different encoding. Using function system() is not necessary.</p> <p><strong>Windows 1253</strong> encoding:</p> <pre><code>//Save As Windows 1253 #include &lt;stdio.h&gt; #include &lt;windows.h&gt; int main() { SetConsoleOutputCP(1253); char *ansichar_ = "Ιλιάδα"; unsigned char lambda1253char = 'λ'; printf("ansichar_: %s\n", ansichar_); printf("λ %#x\n", lambda1253char); } </code></pre> <p>Result:</p> <pre><code>ansichar_: Ιλιάδα λ 0xeb </code></pre> <p><strong>UTF-16</strong> encoding:</p> <pre><code> //Save As UTF16 (Unicode) #include &lt;stdio.h&gt; #include &lt;io.h&gt; #include &lt;fcntl.h&gt; #include &lt;wchar.h&gt; int main() { _setmode(_fileno(stdout), _O_U16TEXT); wchar_t *wchar_ = L"Ιλιάδα"; wchar_t lambdaWchar = L'λ'; wprintf(L"wchar_: %s\n", wchar_); wprintf(L"λ %#x\n", lambdaWchar); } </code></pre> <p>Result:</p> <pre><code>wchar_: Ιλιάδα λ 0x3bb </code></pre> <p><strong>UTF-8</strong> encoding:</p> <pre><code> //Save As UTF8 without BOM signature #include &lt;stdio.h&gt; #include &lt;windows.h&gt; int main() { SetConsoleOutputCP(65001); char *utf8char_ = "Ιλιάδα"; int lambdaUTF8char = 'λ'; printf("utf8char_: %s\n", utf8char_); printf("λ %#x\n", lambdaUTF8char); } </code></pre> <p>Result:</p> <pre><code>utf8char_: Ιλιάδα λ 0xcebb </code></pre> <p>In any case, set the default console font: Lucida Console.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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