<?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[[std::locale] kennt locale nicht]]></title><description><![CDATA[<pre><code class="language-cpp">void toUpper(std::string&amp; str)
{
	std::locale loc(&quot;de_AT&quot;);
	for(int i=0; i&lt;str.size(); i++)
		str[i] = std::toupper(str[i], loc);
}
</code></pre>
<p>ein aufruf dieser funktion wirft einen std::runtime_error.</p>
<pre><code>what():  locale::facet::_S_create_c_locale name not valid
</code></pre>
<p>wenn ich mir mit 'locale -a' alle locales aufliste, dann kommen da u.a.</p>
<pre><code>de_AT
de_AT.ISO8859-1
de_AT.ISO8859-15
de_AT.UTF-8
</code></pre>
<p>vor.<br />
das ganze müsste also klappen. warum gehts trotzdem nicht?<br />
ich verwende den gcc version 4.0.1 (Apple Inc. build 5493).</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/256966/std-locale-kennt-locale-nicht</link><generator>RSS for Node</generator><lastBuildDate>Thu, 10 Sep 2026 17:03:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/256966.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 20 Dec 2009 17:44:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [std::locale] kennt locale nicht on Sun, 20 Dec 2009 17:44:25 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">void toUpper(std::string&amp; str)
{
	std::locale loc(&quot;de_AT&quot;);
	for(int i=0; i&lt;str.size(); i++)
		str[i] = std::toupper(str[i], loc);
}
</code></pre>
<p>ein aufruf dieser funktion wirft einen std::runtime_error.</p>
<pre><code>what():  locale::facet::_S_create_c_locale name not valid
</code></pre>
<p>wenn ich mir mit 'locale -a' alle locales aufliste, dann kommen da u.a.</p>
<pre><code>de_AT
de_AT.ISO8859-1
de_AT.ISO8859-15
de_AT.UTF-8
</code></pre>
<p>vor.<br />
das ganze müsste also klappen. warum gehts trotzdem nicht?<br />
ich verwende den gcc version 4.0.1 (Apple Inc. build 5493).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1825482</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1825482</guid><dc:creator><![CDATA[Jover]]></dc:creator><pubDate>Sun, 20 Dec 2009 17:44:25 GMT</pubDate></item><item><title><![CDATA[Reply to [std::locale] kennt locale nicht on Mon, 21 Dec 2009 08:58:03 GMT]]></title><description><![CDATA[<p>Ich habe ein ähnliches Problem, und es sieht so aus als ob in der STL-Implementierung auf &quot;Mac OS&quot; nur das Locale &quot;C&quot; unterstützt wird. Noch nicht mal eine Default-Initialisierung eines Locale funktioniert, wenn nicht zufällig &quot;C&quot; als System- Locale gesetzt ist. Siehe auch:<br />
<a href="http://stackoverflow.com/questions/1745045/stdlocale-breakage-on-macos-10-6-with-langenus-utf-8" rel="nofollow">http://stackoverflow.com/questions/1745045/stdlocale-breakage-on-macos-10-6-with-langenus-utf-8</a></p>
<p>Selbst boost::filesystem::wpath hat damit ein Problem. Es würde mich interessieren, wenn jemand eine bessere Lösung dafür hat. (außer nur &quot;C&quot; als Locale zu verwenden.)</p>
<p>DJohn</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1825677</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1825677</guid><dc:creator><![CDATA[DJohn@work]]></dc:creator><pubDate>Mon, 21 Dec 2009 08:58:03 GMT</pubDate></item><item><title><![CDATA[Reply to [std::locale] kennt locale nicht on Mon, 21 Dec 2009 13:47:15 GMT]]></title><description><![CDATA[<p>hallo.</p>
<p>ja, das hab ich auch schon gefunden. scheint wohl aussichtslos zu sein.<br />
ich werde vorerst mit locales nicht mehr arbeiten, da die mir einfach zu platformabhängig sind.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1825863</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1825863</guid><dc:creator><![CDATA[Jover]]></dc:creator><pubDate>Mon, 21 Dec 2009 13:47:15 GMT</pubDate></item></channel></rss>