<?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[UTF16 dateiname]]></title><description><![CDATA[<p>Hallo,<br />
Ich glaub das internet will mich zur Weißglut bringen, es kann doch nicht sein, dass es keine einzige crossplattform-Library gibt, die das öffnen von dateien mit einem UTF16 oder UTF32-namen zulässt? mehr brauche ich (neben der Möglichkeit, bytes aus der Datei zu lesen und hineinschreiben) garnicht. Hab ich vllt eine Grundfunktionalität von C++ übersehen oder so ähnlich?</p>
<p>Wenns in C++ nichts Vernünftiges gibt, gibts was in C?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/220694/utf16-dateiname</link><generator>RSS for Node</generator><lastBuildDate>Tue, 06 Oct 2026 22:13:45 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/220694.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 19 Aug 2008 19:21:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to UTF16 dateiname on Tue, 19 Aug 2008 19:21:59 GMT]]></title><description><![CDATA[<p>Hallo,<br />
Ich glaub das internet will mich zur Weißglut bringen, es kann doch nicht sein, dass es keine einzige crossplattform-Library gibt, die das öffnen von dateien mit einem UTF16 oder UTF32-namen zulässt? mehr brauche ich (neben der Möglichkeit, bytes aus der Datei zu lesen und hineinschreiben) garnicht. Hab ich vllt eine Grundfunktionalität von C++ übersehen oder so ähnlich?</p>
<p>Wenns in C++ nichts Vernünftiges gibt, gibts was in C?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1567829</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1567829</guid><dc:creator><![CDATA[Azrael* il Meraz]]></dc:creator><pubDate>Tue, 19 Aug 2008 19:21:59 GMT</pubDate></item><item><title><![CDATA[Reply to UTF16 dateiname on Tue, 19 Aug 2008 20:06:31 GMT]]></title><description><![CDATA[<p>wenn du im speziellen was für linux brauchst, vergiss es <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="🙂"
    /> der kernel unterstützt 'nur' UTF8 dateinamen für den open() syscall. daher gibt es auch keine entsprechung für das wopen()/CreateFileW() von windows. wie es bei macos aussieht kann ich allerdings nicht sagen <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1567849</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1567849</guid><dc:creator><![CDATA[sothis_]]></dc:creator><pubDate>Tue, 19 Aug 2008 20:06:31 GMT</pubDate></item><item><title><![CDATA[Reply to UTF16 dateiname on Tue, 19 Aug 2008 20:37:18 GMT]]></title><description><![CDATA[<p>???Oo<br />
<a href="http://www.linux.com/articles/39911" rel="nofollow">http://www.linux.com/articles/39911</a> und was ist damit?<br />
Thanks to the properties of UTF-8 encoding, the Linux kernel, the innermost and lowest-level part of the operating system, can handle Unicode filenames without even having the user tell it that UTF-8 is to be used. All character strings, including filenames, are treated by the kernel in such a way that they appear to it only as strings of bytes. Thus, it doesn't care and does not need to know whether a pair of consecutive bytes should logically be treated as two characters or a single one. The only risk of the kernel being fooled would be, for example, for a filename to contain a multibyte Unicode character encoded in such a way that one of the bytes used to represent it was a slash or some other character that has a special meaning in file names. Fortunately, as we noted, UTF-8 never uses ASCII characters for encoding multibyte characters, so neither the slash nor any other special character can appear as part of one and therefore there is no risk associated with using Unicode in filenames.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1567865</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1567865</guid><dc:creator><![CDATA[Azrael* il Meraz]]></dc:creator><pubDate>Tue, 19 Aug 2008 20:37:18 GMT</pubDate></item><item><title><![CDATA[Reply to UTF16 dateiname on Tue, 19 Aug 2008 20:42:47 GMT]]></title><description><![CDATA[<p>Da steht nur, dass der Kernel sich nicht um die UTF-8 Sache kümmert. Er reicht die Bytes einfach nur durch. Aber der Kernel aktzeptiert nur Filenamen, welche eine Charackterlänge von einem Byte haben und den ASCII-Zeichensatz als Untermenge beinhaltet. UTF-16 wird der Kernel nicht unterstützen können, da für UTF-16 immer zwei Bytes angeschaut werden müssten, was der Kernel nicht macht.</p>
<p>Lösung: UTF-16 Strings in UTF-8 Strings umwandeln!</p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1567866</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1567866</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Tue, 19 Aug 2008 20:42:47 GMT</pubDate></item><item><title><![CDATA[Reply to UTF16 dateiname on Tue, 19 Aug 2008 20:44:42 GMT]]></title><description><![CDATA[<p>Azrael, il Meraz schrieb:</p>
<blockquote>
<p>???Oo<br />
<a href="http://www.linux.com/articles/39911" rel="nofollow">http://www.linux.com/articles/39911</a> und was ist damit?<br />
Thanks to the properties of UTF-8 encoding, the Linux kernel, the innermost and lowest-level part of the operating system, can handle Unicode filenames without even having the user tell it that UTF-8 is to be used. All character strings, including filenames, are treated by the kernel in such a way that they appear to it only as strings of bytes. Thus, it doesn't care and does not need to know whether a pair of consecutive bytes should logically be treated as two characters or a single one. The only risk of the kernel being fooled would be, for example, for a filename to contain a multibyte Unicode character encoded in such a way that one of the bytes used to represent it was a slash or some other character that has a special meaning in file names. Fortunately, as we noted, UTF-8 never uses ASCII characters for encoding multibyte characters, so neither the slash nor any other special character can appear as part of one and therefore there is no risk associated with using Unicode in filenames.</p>
</blockquote>
<p>da steht genau das, was ich gemeint habe <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1567868</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1567868</guid><dc:creator><![CDATA[sothis_]]></dc:creator><pubDate>Tue, 19 Aug 2008 20:44:42 GMT</pubDate></item><item><title><![CDATA[Reply to UTF16 dateiname on Tue, 19 Aug 2008 21:00:58 GMT]]></title><description><![CDATA[<p>ja und was ist mit Dateinamen wie &quot;東京都市2008&quot;?...<br />
oder wird das irgendwie intern aufgelöst? Ich glaub ich hab das nicht so recht verstanden wie das gemeint ist</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1567875</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1567875</guid><dc:creator><![CDATA[Azrael* il Meraz]]></dc:creator><pubDate>Tue, 19 Aug 2008 21:00:58 GMT</pubDate></item><item><title><![CDATA[Reply to UTF16 dateiname on Tue, 19 Aug 2008 21:18:08 GMT]]></title><description><![CDATA[<p>Azrael, il Meraz schrieb:</p>
<blockquote>
<p>ja und was ist mit Dateinamen wie &quot;東京都市2008&quot;?...<br />
oder wird das irgendwie intern aufgelöst? Ich glaub ich hab das nicht so recht verstanden wie das gemeint ist</p>
</blockquote>
<p>ich glaube du solltest dir noch mal genau den zusammenhang zwischen UTF8, UTF16 und UTF32 anschauen. &quot;東京都市2008&quot; ist auch nur eine folge von bytes. wie diese interpretiert wird hängt dann ganz allein von deinem programm ab. wie dravere schon sagte, UTF16 oder UCS2 nach UTF8 umwandeln und dieses char array wie gewohnt weiterverwenden.</p>
<p>edit: ich hab den obligatorischen smilie vergessen <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1567880</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1567880</guid><dc:creator><![CDATA[sothis_]]></dc:creator><pubDate>Tue, 19 Aug 2008 21:18:08 GMT</pubDate></item><item><title><![CDATA[Reply to UTF16 dateiname on Tue, 19 Aug 2008 21:32:14 GMT]]></title><description><![CDATA[<p>oha. danke für den hinweis, hab grad ne wissenslücke gefüllt! UTF-8 hast also variable bytelänge...</p>
<p>Also müsste theoretisch eine methode implementiert werden, die unter windows den dateinamen belässt, wie er ist und unter linux einen UTF-8 string daraus macht? oder kann windows auch mit UTF-8 umgehen? bitte aufklären ^^</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1567883</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1567883</guid><dc:creator><![CDATA[Azrael* il Meraz]]></dc:creator><pubDate>Tue, 19 Aug 2008 21:32:14 GMT</pubDate></item><item><title><![CDATA[Reply to UTF16 dateiname on Tue, 19 Aug 2008 21:43:17 GMT]]></title><description><![CDATA[<p>Azrael, il Meraz schrieb:</p>
<blockquote>
<p>Also müsste theoretisch eine methode implementiert werden, die unter windows den dateinamen belässt, wie er ist und unter linux einen UTF-8 string daraus macht?</p>
</blockquote>
<p>so sieht es aus, zumindest wenn du mit den unicodevarianten der WinAPI-funktionen rumhantierst <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>Azrael, il Meraz schrieb:</p>
<blockquote>
<p>oder kann windows auch mit UTF-8 umgehen? bitte aufklären ^^</p>
</blockquote>
<p>nicht direkt. die unicodefunktionen wie CreateFileW() jedenfalls wollen UTF16, da führt kein weg dran vorbei. die ansistringvariante CreateFileA() interpretiert den string je nach eingestelltem characterset auf dem zielrechner (das wie auch immer ist eine vermutung meinerseits, da können andere windowsfreaks mehr informtionen geben). <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1567885</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1567885</guid><dc:creator><![CDATA[sothis_]]></dc:creator><pubDate>Tue, 19 Aug 2008 21:43:17 GMT</pubDate></item></channel></rss>