<?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[wstring in char* konvertieren]]></title><description><![CDATA[<p>Hallo ,</p>
<p>weiß vielleicht jemand wie man std::wstring in char* konvertieren kann ?</p>
<p>Danke.</p>
<p>Mfg Elke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/147346/wstring-in-char-konvertieren</link><generator>RSS for Node</generator><lastBuildDate>Wed, 15 Apr 2026 15:41:48 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/147346.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 16 May 2006 07:35:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to wstring in char* konvertieren on Tue, 16 May 2006 07:35:43 GMT]]></title><description><![CDATA[<p>Hallo ,</p>
<p>weiß vielleicht jemand wie man std::wstring in char* konvertieren kann ?</p>
<p>Danke.</p>
<p>Mfg Elke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1058615</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1058615</guid><dc:creator><![CDATA[Elke100]]></dc:creator><pubDate>Tue, 16 May 2006 07:35:43 GMT</pubDate></item><item><title><![CDATA[Reply to wstring in char* konvertieren on Tue, 16 May 2006 07:42:48 GMT]]></title><description><![CDATA[<p>Mit Bordmitteln würden mir nur Locales (genauer: die Facette codecvt&lt;&gt;) einfallen - aber ich hab' keine Ahnung, ob die wirklich passt.</p>
<p>Jenseits des Standards kenne ich noch die MFC-Stringumwandlungs-Makros (W2A() und Konsorten).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1058618</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1058618</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Tue, 16 May 2006 07:42:48 GMT</pubDate></item><item><title><![CDATA[Reply to wstring in char* konvertieren on Tue, 16 May 2006 08:42:36 GMT]]></title><description><![CDATA[<p>Falls es immernoch um Xerces-C++ geht:</p>
<pre><code class="language-cpp">#include &lt;xercesc/util/XMLString.hpp&gt;

/* ... */
char *c_string = XMLString::transcode( wide_string.c_str() );
/* mach was mit c_string */
XMLString::release(c_string);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1058638</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1058638</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Tue, 16 May 2006 08:42:36 GMT</pubDate></item><item><title><![CDATA[Reply to wstring in char* konvertieren on Tue, 16 May 2006 08:45:45 GMT]]></title><description><![CDATA[<p>Könnte man nicht narrow nehmen?<br />
Etwa so?</p>
<pre><code class="language-cpp">wstring wtext = L&quot;Das ist ein Text&quot;;
size_t size = wtext.size();
char *Narrow = new char[size+1];
locale loc;
char def = ' ';
use_facet&lt;ctype&lt;wchar_t&gt; &gt; (loc).narrow(wtext.c_str(), wtext.c_str()+size, def, Narrow);
Narrow[size] = '\0';
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1058643</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1058643</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Tue, 16 May 2006 08:45:45 GMT</pubDate></item><item><title><![CDATA[Reply to wstring in char* konvertieren on Tue, 16 May 2006 08:52:36 GMT]]></title><description><![CDATA[<p>Hallo LordJaxom ,</p>
<p>nein , es handelt sichj nicht mehr um den XML-String . Ich habe schon geparst und bin jetzt weiter .</p>
<p>Aber ich kann ja versuchen den wstring in wchar_t* und dann wchar* in char*<br />
konvertieren.</p>
<p>Kannst du mir da vielleicht helfen ?</p>
<p>Danke.</p>
<p>Mfg Elke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1058650</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1058650</guid><dc:creator><![CDATA[Elke100]]></dc:creator><pubDate>Tue, 16 May 2006 08:52:36 GMT</pubDate></item><item><title><![CDATA[Reply to wstring in char* konvertieren on Tue, 16 May 2006 08:55:49 GMT]]></title><description><![CDATA[<p>Hallo Braunstein,</p>
<p>diese Methode ist bestimmt eine MFC-Methode .? Oder ?</p>
<pre><code class="language-cpp">use_facet&lt;ctype&lt;wchar_t&gt; &gt; (loc).narrow(wtext.c_str(), wtext.c_str()+size, def, Narrow);
</code></pre>
<p>DAs Problem ist, unsere Anwendungen laufen bei uns auf 2 Plattformen(Windoes und Unix ). <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>Danke.</p>
<p>Mfg , Elke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1058654</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1058654</guid><dc:creator><![CDATA[Elke100]]></dc:creator><pubDate>Tue, 16 May 2006 08:55:49 GMT</pubDate></item><item><title><![CDATA[Reply to wstring in char* konvertieren on Tue, 16 May 2006 08:59:28 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>nein das läuft auf meinen Borland Builder in reiner C++Standard-Konsole auch.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1058658</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1058658</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Tue, 16 May 2006 08:59:28 GMT</pubDate></item><item><title><![CDATA[Reply to wstring in char* konvertieren on Tue, 16 May 2006 09:18:27 GMT]]></title><description><![CDATA[<p>Um akaris Aussage nochmals zu untermauern. Das das reines Standard-C++.<br />
Allerdings funktioniert das bei mir auch nur mit meinem BCB6 aber nicht mit MinGW32 (abnormal program termination).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1058675</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1058675</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Tue, 16 May 2006 09:18:27 GMT</pubDate></item><item><title><![CDATA[Reply to wstring in char* konvertieren on Tue, 16 May 2006 09:20:02 GMT]]></title><description><![CDATA[<p>So , jetzt kann ich denn wstring in wchar_t* konvertieren.</p>
<pre><code class="language-cpp">wchar_t* oMitteilung ;
std::wstring wMittelung = L&quot;D&quot;;

oMitteilung = wMittelung .data();
</code></pre>
<p>Jetzt muss ich nuc´r noch den wchar_t* in char* konvertieren .<br />
Wäre toll , wenn mir jemand helfen könnte .</p>
<p>Mfg , Elke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1058677</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1058677</guid><dc:creator><![CDATA[Elke100]]></dc:creator><pubDate>Tue, 16 May 2006 09:20:02 GMT</pubDate></item><item><title><![CDATA[Reply to wstring in char* konvertieren on Tue, 16 May 2006 09:24:25 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>aber genau das hat doch Braunstein gepostet... zwar von <em>wstring</em> auf <em>char</em>*, aber das prinzip ist das selbe.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1058680</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1058680</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Tue, 16 May 2006 09:24:25 GMT</pubDate></item><item><title><![CDATA[Reply to wstring in char* konvertieren on Tue, 16 May 2006 10:12:45 GMT]]></title><description><![CDATA[<p>Hallo Akari,</p>
<p>du hast recht , aber ich wollte es nur einfacher haben.</p>
<p>Jetzt konnte ich auch den wchar* in char* konvertieren :</p>
<pre><code class="language-cpp">std::wstring x = L&quot;D&quot;;
wchar_t* woMitteilung; 

woMitteilung = ( wchar_t* )x.data(); // gibt den wchar_t
swcstombs( oMitteilung , ( const wchar_t* )woMitteilung , 2 );
</code></pre>
<p>2 ist die Länge -habe hart reingestellt zum Testen.</p>
<p>Vielen Dank für eure Unterstützung.</p>
<p>Mfg ,<br />
Elke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1058717</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1058717</guid><dc:creator><![CDATA[Elke100]]></dc:creator><pubDate>Tue, 16 May 2006 10:12:45 GMT</pubDate></item></channel></rss>