<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Deutsche Umlaute]]></title><description><![CDATA[<p>Es gibt eine einfachere Methode im C++ Konsolenprogrammierung Umlaute zu verwenden und auch Sonderzeichen:</p>
<pre><code>#include &lt;locale&gt;
using namespace std;

main()
{
  locale loc(&quot;&quot;);
  locale::global(loc);

  cout &lt;&lt; &quot; Ä ä Ö ö Ü ü ß&quot; &lt;&lt; endl;
}
</code></pre>
<p>Somit muss der Programmierer nicht immer umständlich die Codierung im Text einfügen.</p>
<p>lg<br />
Sandor++</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/324415/deutsche-umlaute</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 16:19:41 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/324415.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 16 Mar 2014 17:33:39 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Deutsche Umlaute on Sun, 16 Mar 2014 17:33:39 GMT]]></title><description><![CDATA[<p>Es gibt eine einfachere Methode im C++ Konsolenprogrammierung Umlaute zu verwenden und auch Sonderzeichen:</p>
<pre><code>#include &lt;locale&gt;
using namespace std;

main()
{
  locale loc(&quot;&quot;);
  locale::global(loc);

  cout &lt;&lt; &quot; Ä ä Ö ö Ü ü ß&quot; &lt;&lt; endl;
}
</code></pre>
<p>Somit muss der Programmierer nicht immer umständlich die Codierung im Text einfügen.</p>
<p>lg<br />
Sandor++</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2389242</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389242</guid><dc:creator><![CDATA[Sandor++]]></dc:creator><pubDate>Sun, 16 Mar 2014 17:33:39 GMT</pubDate></item><item><title><![CDATA[Reply to Deutsche Umlaute on Sun, 16 Mar 2014 17:49:39 GMT]]></title><description><![CDATA[<p>Das bringt leider nix, wenn z.B. die Windows-Konsole keine Sonderzeichen unterstützt und dann sowas rauskommt:</p>
<pre><code>─ õ Í ÷ ▄ ³ ▀
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2389247</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389247</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Sun, 16 Mar 2014 17:49:39 GMT</pubDate></item><item><title><![CDATA[Reply to Deutsche Umlaute on Sun, 16 Mar 2014 18:20:19 GMT]]></title><description><![CDATA[<p>RonjaRaeuber schrieb:</p>
<blockquote>
<p>Das bringt leider nix, wenn z.B. die Windows-Konsole keine Sonderzeichen unterstützt und dann sowas rauskommt</p>
</blockquote>
<p>Es liegt nicht an der Windows Konsole!<br />
Ich hab mich neulich erst näher damit beschäftigt.<br />
Am Ende von ostream::operator&lt;&lt; wird wohl unter Windows irgendwo ganz tief unten WriteConsoleA oder eine ähnliche Funktion stehen.<br />
Diese Funktionen erwarten als Encoding</p>
<blockquote>
<p>ANSI characters from the console's current code page</p>
</blockquote>
<p>. Wenn du nun Umlaute in deinem Sourcecode stehen hast, werden sie in dem Encoding gespeichert, was dein Editor verwendet. Stimmen diese beiden Encodings überein: super, kein Problem, du siehst die Umlaute. Stimmen die nicht überein, kommt Müll raus.<br />
Um nun beliebige Zeichen auszugeben, muss man sie in das Ziel-Encoding konvertieren. Bei mir ist das die Windows Codepage 850. Die unterstützt aber längst nicht alle Zeichen von bspw. Unicode!<br />
Also sollte man WriteConsoleW verwenden. WriteConsoleW erwartet nämlich soweit ich weiß den Ausgabestring als UTF-16. Und UTF-16 unterstützt alle diese Zeichen. Das einzige Problem was bleibt ist folgendes: Es kann sein, dass die Schriftart der Windows Konsole nicht Glyphs für alle Unicodezeichen hat, aber es werden auf jeden Fall schon mehr unterstützt. Ich kann auf jeden Fall problemlos viele Sonderzeichen so ausgeben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2389254</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389254</guid><dc:creator><![CDATA[Nathan]]></dc:creator><pubDate>Sun, 16 Mar 2014 18:20:19 GMT</pubDate></item><item><title><![CDATA[Reply to Deutsche Umlaute on Sun, 16 Mar 2014 20:41:39 GMT]]></title><description><![CDATA[<p>Ist das nun trotzdem noch besser, als sowas zu verwenden?</p>
<pre><code>const unsigned char AE = static_cast&lt;unsigned char&gt;(142);
const unsigned char ae = static_cast&lt;unsigned char&gt;(132);
const unsigned char OE = static_cast&lt;unsigned char&gt;(153);
const unsigned char oe = static_cast&lt;unsigned char&gt;(148);
const unsigned char UE = static_cast&lt;unsigned char&gt;(154);
const unsigned char ue = static_cast&lt;unsigned char&gt;(129);
const unsigned char ss = static_cast&lt;unsigned char&gt;(225);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2389288</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389288</guid><dc:creator><![CDATA[hardware]]></dc:creator><pubDate>Sun, 16 Mar 2014 20:41:39 GMT</pubDate></item><item><title><![CDATA[Reply to Deutsche Umlaute on Sun, 16 Mar 2014 20:49:59 GMT]]></title><description><![CDATA[<p>Das Beste ist, in Konsolenprogrammen auf Umlaute zu verzichten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2389290</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389290</guid><dc:creator><![CDATA[DirkB]]></dc:creator><pubDate>Sun, 16 Mar 2014 20:49:59 GMT</pubDate></item><item><title><![CDATA[Reply to Deutsche Umlaute on Sun, 16 Mar 2014 20:53:31 GMT]]></title><description><![CDATA[<p>DirkB schrieb:</p>
<blockquote>
<p>Das Beste ist, in Konsolenprogrammen auf <em>Windows</em> zu verzichten.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/2389291</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389291</guid><dc:creator><![CDATA[ftfy]]></dc:creator><pubDate>Sun, 16 Mar 2014 20:53:31 GMT</pubDate></item><item><title><![CDATA[Reply to Deutsche Umlaute on Sun, 16 Mar 2014 22:02:37 GMT]]></title><description><![CDATA[<p>Ich habe leider nur noch vergessen das #include &lt;iostream&gt;<br />
zu deklarien. Also bei mir funktionierts wunderbar.<br />
Mit Linux sowie auch unter Windows. Da nutze ich aber das VS C++ 2013 IDE.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2389296</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389296</guid><dc:creator><![CDATA[Sandor++]]></dc:creator><pubDate>Sun, 16 Mar 2014 22:02:37 GMT</pubDate></item><item><title><![CDATA[Reply to Deutsche Umlaute on Mon, 17 Mar 2014 07:48:09 GMT]]></title><description><![CDATA[<p>ftfy schrieb:</p>
<blockquote>
<p>DirkB schrieb:</p>
<blockquote>
<p>Das Beste ist, auf <em>Windows</em> zu verzichten.</p>
</blockquote>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/2389322</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389322</guid><dc:creator><![CDATA[otze]]></dc:creator><pubDate>Mon, 17 Mar 2014 07:48:09 GMT</pubDate></item><item><title><![CDATA[Reply to Deutsche Umlaute on Mon, 17 Mar 2014 09:17:25 GMT]]></title><description><![CDATA[<p>Was die Leute hier für Probleme haben...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2389334</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389334</guid><dc:creator><![CDATA[Sandor++]]></dc:creator><pubDate>Mon, 17 Mar 2014 09:17:25 GMT</pubDate></item><item><title><![CDATA[Reply to Deutsche Umlaute on Mon, 17 Mar 2014 11:12:49 GMT]]></title><description><![CDATA[<p>Sandor++ schrieb:</p>
<blockquote>
<p>Ich habe leider nur noch vergessen das #include &lt;iostream&gt;<br />
zu deklarien. Also bei mir funktionierts wunderbar.<br />
Mit Linux sowie auch unter Windows. Da nutze ich aber das VS C++ 2013 IDE.</p>
</blockquote>
<p>Wie Nathan schon sagte: Das geht nur wenn das Encoding von IDE und Konsole gleich ist. Stell das mal um und du wirst sehen: Es geht nicht mehr.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2389347</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389347</guid><dc:creator><![CDATA[encodings]]></dc:creator><pubDate>Mon, 17 Mar 2014 11:12:49 GMT</pubDate></item><item><title><![CDATA[Reply to Deutsche Umlaute on Mon, 17 Mar 2014 12:33:39 GMT]]></title><description><![CDATA[<p>Und wo stellt man die um?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2389360</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2389360</guid><dc:creator><![CDATA[Sandor++]]></dc:creator><pubDate>Mon, 17 Mar 2014 12:33:39 GMT</pubDate></item></channel></rss>