<?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[How to preserve the char case of host name returned from QUrl::host()?]]></title><description><![CDATA[<p dir="auto">It seems that QUrl::host() always returned a lower case string, can I get the original host name(keep case unchanged)?</p>
<p dir="auto">For example:</p>
<pre><code>QUrl url("MyProtocol://MyHost/kkkk");
// the codes which fix this issue go here
Q_ASSERT(url.host() == "MyHost");
</code></pre>
]]></description><link>https://forum.qt.io/topic/158430/how-to-preserve-the-char-case-of-host-name-returned-from-qurl-host</link><generator>RSS for Node</generator><lastBuildDate>Sun, 19 Apr 2026 05:47:35 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/158430.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 27 Aug 2024 16:31:47 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to preserve the char case of host name returned from QUrl::host()? on Tue, 27 Aug 2024 16:47:09 GMT]]></title><description><![CDATA[<p dir="auto">The docs for QUrl refer to RFC 3987:<br />
...<br />
When an IRI uses components of the generic syntax, the component syntax equivalence rules always apply; namely, that the scheme and US-ASCII only host are case insensitive and therefore should be normalized to lowercase.  For example, the URI<br />
"<a href="HTTP://www.EXAMPLE.com/" target="_blank" rel="noopener noreferrer nofollow ugc">HTTP://www.EXAMPLE.com/</a>" is equivalent to "<a href="http://www.example.com/" target="_blank" rel="noopener noreferrer nofollow ugc">http://www.example.com/</a>".<br />
...</p>
<p dir="auto">So the odds are against you finding the original case of the host :-(</p>
]]></description><link>https://forum.qt.io/post/808196</link><guid isPermaLink="true">https://forum.qt.io/post/808196</guid><dc:creator><![CDATA[hskoglund]]></dc:creator><pubDate>Tue, 27 Aug 2024 16:47:09 GMT</pubDate></item></channel></rss>