<?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[anfänger-frage: in textdatei schreiben]]></title><description><![CDATA[<p>Hallo, ich würde gerne folgendes wissen:</p>
<p>wenn ich ganz normal über einen fstream in eine Datei schreibe, welche Codierung hat das dann?<br />
Und wie könnte ich die Codierung ändern?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/252216/anfänger-frage-in-textdatei-schreiben</link><generator>RSS for Node</generator><lastBuildDate>Mon, 14 Sep 2026 12:33:27 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/252216.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Oct 2009 11:44:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to anfänger-frage: in textdatei schreiben on Fri, 16 Oct 2009 11:44:55 GMT]]></title><description><![CDATA[<p>Hallo, ich würde gerne folgendes wissen:</p>
<p>wenn ich ganz normal über einen fstream in eine Datei schreibe, welche Codierung hat das dann?<br />
Und wie könnte ich die Codierung ändern?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793321</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793321</guid><dc:creator><![CDATA[shisha]]></dc:creator><pubDate>Fri, 16 Oct 2009 11:44:55 GMT</pubDate></item><item><title><![CDATA[Reply to anfänger-frage: in textdatei schreiben on Fri, 16 Oct 2009 11:50:14 GMT]]></title><description><![CDATA[<p>shisha schrieb:</p>
<blockquote>
<p>wenn ich ganz normal über einen fstream in eine Datei schreibe, welche Codierung hat das dann?<br />
Und wie könnte ich die Codierung ändern?</p>
</blockquote>
<p>Die Antworten darauf solltest du in jeder Referenz über std::fstream finden, genauso in jedem Tutorial/Buch. Schau beispielsweise mal unter <a href="http://www.cplusplus.com/reference/iostream/fstream/" rel="nofollow">http://www.cplusplus.com/reference/iostream/fstream/</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793325</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793325</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Fri, 16 Oct 2009 11:50:14 GMT</pubDate></item><item><title><![CDATA[Reply to anfänger-frage: in textdatei schreiben on Mon, 19 Oct 2009 15:02:15 GMT]]></title><description><![CDATA[<p>ich denke ich verstehe da nicht alles, ich bin trotz intensiven lesens der angegeben quelle nicht zu meinem ergebnis gekommen,</p>
<p>ich denke es liegt eher an mangeldem verständnis als an blödheit</p>
<p>kann einer den zur lösung nötigen abschnitt notieren und erklären?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1794889</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1794889</guid><dc:creator><![CDATA[shisha]]></dc:creator><pubDate>Mon, 19 Oct 2009 15:02:15 GMT</pubDate></item><item><title><![CDATA[Reply to anfänger-frage: in textdatei schreiben on Mon, 19 Oct 2009 15:04:19 GMT]]></title><description><![CDATA[<p>Codierung hat das ganze gar keine...</p>
<p>du kannst nur die hier aufgelisteten flags übergeben:<br />
<a href="http://www.cplusplus.com/reference/iostream/fstream/fstream/" rel="nofollow">http://www.cplusplus.com/reference/iostream/fstream/fstream/</a></p>
<p>also entweder binär oder in nem lesbaren format (idR ascii)...</p>
<p>bb</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1794891</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1794891</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Mon, 19 Oct 2009 15:04:19 GMT</pubDate></item><item><title><![CDATA[Reply to anfänger-frage: in textdatei schreiben on Mon, 19 Oct 2009 15:17:02 GMT]]></title><description><![CDATA[<p>genau das meine ich mit unkenntnis:</p>
<p>was genau heißt ohne formatierung/ idR ascii?</p>
<p>wo liegen da genau die unterschiede?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1794898</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1794898</guid><dc:creator><![CDATA[shisha]]></dc:creator><pubDate>Mon, 19 Oct 2009 15:17:02 GMT</pubDate></item><item><title><![CDATA[Reply to anfänger-frage: in textdatei schreiben on Mon, 19 Oct 2009 15:22:02 GMT]]></title><description><![CDATA[<p>Wozu ist das Überhaupt wichtig ?<br />
Ich schreib eh nir chinesische Zeichen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1794903</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1794903</guid><dc:creator><![CDATA[5cript]]></dc:creator><pubDate>Mon, 19 Oct 2009 15:22:02 GMT</pubDate></item><item><title><![CDATA[Reply to anfänger-frage: in textdatei schreiben on Mon, 19 Oct 2009 18:18:31 GMT]]></title><description><![CDATA[<p>lasst mich nicht dumm sterben, bitte <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title="=)"
      alt="🙂"
    /></p>
<p>also ich habs jetzt einfach mal probiert:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;fstream&gt;

using namespace std;

int main()
{
    fstream out;
    out.open(&quot;c++.txt&quot;, ios::out);
    out &lt;&lt;  &quot;Ä Ö Ü ä ü ö&quot;;
    out.close();
}
</code></pre>
<p>lieferte mir hier anscheinend UTF-8:</p>
<pre><code>C3 84 20 C3 96 20 C3 9C 20 C3 A4 20 C3 BC 20 C3 B6
</code></pre>
<p>wieso ist das so? wie kann ich so etwas beeinflussen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1794987</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1794987</guid><dc:creator><![CDATA[shisha]]></dc:creator><pubDate>Mon, 19 Oct 2009 18:18:31 GMT</pubDate></item><item><title><![CDATA[Reply to anfänger-frage: in textdatei schreiben on Mon, 19 Oct 2009 18:20:52 GMT]]></title><description><![CDATA[<p>shisha schrieb:</p>
<blockquote>
<p>anfänger-frage: in textdatei schreiben</p>
</blockquote>
<p>editor öffnen, tippen, speichern.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1794989</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1794989</guid><dc:creator><![CDATA[sdss]]></dc:creator><pubDate>Mon, 19 Oct 2009 18:20:52 GMT</pubDate></item><item><title><![CDATA[Reply to anfänger-frage: in textdatei schreiben on Mon, 19 Oct 2009 18:36:25 GMT]]></title><description><![CDATA[<p>shisha schrieb:</p>
<blockquote>
<p>Und wie könnte ich die Codierung ändern?</p>
</blockquote>
<p>Wenn du Unicode meinst, schau dir mal die <code>std::w...</code> -Varianten für IO an (gleiche Bezeichner, aber mit vorgestelltem &quot;w&quot;), z.B. <code>std::wfstream</code> .</p>
<p>Tim06TR schrieb:</p>
<blockquote>
<p>Wozu ist das Überhaupt wichtig ?<br />
Ich schreib eh nir chinesische Zeichen.</p>
</blockquote>
<p>Du bist auch nicht das Mass aller Dinge. Zumal es nicht nur um chinesische Zeichen geht...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1794999</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1794999</guid><dc:creator><![CDATA[Nexus]]></dc:creator><pubDate>Mon, 19 Oct 2009 18:36:25 GMT</pubDate></item><item><title><![CDATA[Reply to anfänger-frage: in textdatei schreiben on Mon, 19 Oct 2009 18:39:10 GMT]]></title><description><![CDATA[<p>Nexus schrieb:</p>
<blockquote>
<p>Tim06TR schrieb:</p>
<blockquote>
<p>Wozu ist das Überhaupt wichtig ?<br />
Ich schreib eh nir chinesische Zeichen.</p>
</blockquote>
</blockquote>
<p>Stell dir mal vor Stroustrup will einen Brief schreiben. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Alleine schon bei seinem Wohnort Århus hätte er Probleme..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1795001</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1795001</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Mon, 19 Oct 2009 18:39:10 GMT</pubDate></item></channel></rss>