<?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[bad locale name]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich würde gerne die globale locale von meinem Programm ändern. Dafür verwende ich folgenden Code:</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;locale&gt;

int _tmain(int argc, _TCHAR* argv[])
{
	std::locale loc(&quot;&quot;);
	std::cout &lt;&lt; loc.name() &lt;&lt; '\n'; // Outputs: German_Germany.1252

	std::locale loc2(&quot;German_Germany.UTF-8&quot;); // bad locale exception
	std::locale::global(loc2);
}
</code></pre>
<p>Auch de-DE.UTF-8 oder de_DE.UTF-8 funktioniert nicht, obwohl ich das als Beispiel auf diversen Internet Seiten gefunden habe... Letztendlich will ich einfach die Codepage der aktuellen locale auf UTF-8 umstellen (also in meinem Fall von German_Germany.1252 zu German_Germany.UFT-8).</p>
<p>Was läuft hier schief?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/326096/bad-locale-name</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 14:43:59 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/326096.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 01 Jun 2014 15:08:45 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to bad locale name on Sun, 01 Jun 2014 15:08:45 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich würde gerne die globale locale von meinem Programm ändern. Dafür verwende ich folgenden Code:</p>
<pre><code>#include &lt;iostream&gt;
#include &lt;string&gt;
#include &lt;locale&gt;

int _tmain(int argc, _TCHAR* argv[])
{
	std::locale loc(&quot;&quot;);
	std::cout &lt;&lt; loc.name() &lt;&lt; '\n'; // Outputs: German_Germany.1252

	std::locale loc2(&quot;German_Germany.UTF-8&quot;); // bad locale exception
	std::locale::global(loc2);
}
</code></pre>
<p>Auch de-DE.UTF-8 oder de_DE.UTF-8 funktioniert nicht, obwohl ich das als Beispiel auf diversen Internet Seiten gefunden habe... Letztendlich will ich einfach die Codepage der aktuellen locale auf UTF-8 umstellen (also in meinem Fall von German_Germany.1252 zu German_Germany.UFT-8).</p>
<p>Was läuft hier schief?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401915</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401915</guid><dc:creator><![CDATA[happystudent]]></dc:creator><pubDate>Sun, 01 Jun 2014 15:08:45 GMT</pubDate></item><item><title><![CDATA[Reply to bad locale name on Sun, 01 Jun 2014 15:35:21 GMT]]></title><description><![CDATA[<p>Welches betriebsystem?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401921</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401921</guid><dc:creator><![CDATA[firefly]]></dc:creator><pubDate>Sun, 01 Jun 2014 15:35:21 GMT</pubDate></item><item><title><![CDATA[Reply to bad locale name on Wed, 11 Jun 2014 22:08:21 GMT]]></title><description><![CDATA[<p>...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401922</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401922</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Wed, 11 Jun 2014 22:08:21 GMT</pubDate></item><item><title><![CDATA[Reply to bad locale name on Sun, 01 Jun 2014 15:47:17 GMT]]></title><description><![CDATA[<p>Jo, Windows 7 Professional. Entwicklungsumgebung ist Visual Studio 2013.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401925</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401925</guid><dc:creator><![CDATA[happystudent]]></dc:creator><pubDate>Sun, 01 Jun 2014 15:47:17 GMT</pubDate></item><item><title><![CDATA[Reply to bad locale name on Sun, 01 Jun 2014 15:52:36 GMT]]></title><description><![CDATA[<p>Die Ausgabe der locale klingt nach Windows. de_de.utf8 &amp; Co. sind typische Linuxlocales. &quot;German_Germany.UTF-8&quot; habe ich nie gehört und auch Google nicht. Es gibt aber eine locale für Oracleprodukte namens &quot;German_Germany.UTF8&quot;. Laut <a href="http://msdn.microsoft.com/library/windows/desktop/dd317756.aspx" rel="nofollow">MSDN</a> sollte die Bezeichnung &quot;German_Germany.65001&quot; sein.</p>
<p>Wann immer man aber über UTF-8 in Windows spricht, hört man selten Gutes.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401926</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401926</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Sun, 01 Jun 2014 15:52:36 GMT</pubDate></item><item><title><![CDATA[Reply to bad locale name on Wed, 11 Jun 2014 22:08:27 GMT]]></title><description><![CDATA[<p>...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401929</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401929</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Wed, 11 Jun 2014 22:08:27 GMT</pubDate></item><item><title><![CDATA[Reply to bad locale name on Sun, 01 Jun 2014 17:29:06 GMT]]></title><description><![CDATA[<p>SeppJ schrieb:</p>
<blockquote>
<p>Wann immer man aber über UTF-8 in Windows spricht, hört man selten Gutes.</p>
</blockquote>
<p>Echt, warum? Was hört man den an nicht guten Sachen?</p>
<p>Swordfish schrieb:</p>
<blockquote>
<p>Laut <a href="http://msdn.microsoft.com/library/windows/desktop/dd317756.aspx" rel="nofollow">MSDN</a> sollte die Bezeichnung &quot;German_Germany.65001&quot; sein.</p>
</blockquote>
<p>Also ich kann in dem Link die Bezeichung &quot;German_Germany.65001&quot; nirgends finden? Auf jeden Fall crasht das Programm auch mit dieser Bezeichung (immer noch runtimer error: bad locale name).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401939</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401939</guid><dc:creator><![CDATA[happystudent]]></dc:creator><pubDate>Sun, 01 Jun 2014 17:29:06 GMT</pubDate></item><item><title><![CDATA[Reply to bad locale name on Sun, 01 Jun 2014 17:34:43 GMT]]></title><description><![CDATA[<p>happystudent schrieb:</p>
<blockquote>
<p>SeppJ schrieb:</p>
<blockquote>
<p>Wann immer man aber über UTF-8 in Windows spricht, hört man selten Gutes.</p>
</blockquote>
<p>Echt, warum? Was hört man den an nicht guten Sachen?</p>
<p>Swordfish schrieb:</p>
<blockquote>
<p>Laut <a href="http://msdn.microsoft.com/library/windows/desktop/dd317756.aspx" rel="nofollow">MSDN</a> sollte die Bezeichnung &quot;German_Germany.65001&quot; sein.</p>
</blockquote>
<p>Also ich kann in dem Link die Bezeichung &quot;German_Germany.65001&quot; nirgends finden? Auf jeden Fall crasht das Programm auch mit dieser Bezeichung (immer noch runtimer error: bad locale name).</p>
</blockquote>
<p>letzte zeile in der tabelle:<br />
65001 utf-8 Unicode (UTF-8)</p>
<p>ABer utf8 und windows im zusammenspiel mit c++ stl io klappt nicht.<br />
siehe <a href="http://stackoverflow.com/questions/4324542/what-is-the-windows-equivalent-for-en-us-utf-8-locale" rel="nofollow">http://stackoverflow.com/questions/4324542/what-is-the-windows-equivalent-for-en-us-utf-8-locale</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401941</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401941</guid><dc:creator><![CDATA[firefly]]></dc:creator><pubDate>Sun, 01 Jun 2014 17:34:43 GMT</pubDate></item><item><title><![CDATA[Reply to bad locale name on Sun, 01 Jun 2014 17:58:30 GMT]]></title><description><![CDATA[<p>firefly schrieb:</p>
<blockquote>
<p>ABer utf8 und windows im zusammenspiel mit c++ stl io klappt nicht.<br />
siehe <a href="http://stackoverflow.com/questions/4324542/what-is-the-windows-equivalent-for-en-us-utf-8-locale" rel="nofollow">http://stackoverflow.com/questions/4324542/what-is-the-windows-equivalent-for-en-us-utf-8-locale</a></p>
</blockquote>
<p>Na toll <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>Gut dann werd ich wohl um MultiByteToWideChar/WideCharToMultiByte nicht drum rumkommen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401943</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401943</guid><dc:creator><![CDATA[happystudent]]></dc:creator><pubDate>Sun, 01 Jun 2014 17:58:30 GMT</pubDate></item></channel></rss>