<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Coding Out Loud &#187; XML</title>
	<atom:link href="http://blog.codingoutloud.com/category/xml/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.codingoutloud.com</link>
	<description>Yes, another noisy coder...</description>
	<lastBuildDate>Sun, 05 Feb 2012 15:04:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.codingoutloud.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Coding Out Loud &#187; XML</title>
		<link>http://blog.codingoutloud.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.codingoutloud.com/osd.xml" title="Coding Out Loud" />
	<atom:link rel='hub' href='http://blog.codingoutloud.com/?pushpress=hub'/>
		<item>
		<title>December 2010 Boston Azure User Group Meeting Notes</title>
		<link>http://blog.codingoutloud.com/2010/01/27/december-2010-boston-azure-user-group-meeting-notes/</link>
		<comments>http://blog.codingoutloud.com/2010/01/27/december-2010-boston-azure-user-group-meeting-notes/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 22:40:04 +0000</pubDate>
		<dc:creator>Bill Wilder</dc:creator>
				<category><![CDATA[Boston Azure User Group]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://blog.codingoutloud.com/?p=482</guid>
		<description><![CDATA[Second meeting of Boston Azure User Group Guest speakers were Michael Stiefel and Mark Eisenberg Meeting was held December 3, 2009 at the Microsoft NERD We opened with Boston Azure Theater, kicking off a few minutes after 6:00.  For around 45 minutes we watched a video of Microsoft Director Manuvir Das&#8217; PDC talk A Lap [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.codingoutloud.com&amp;blog=490667&amp;post=482&amp;subd=codingoutloud&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1>Second meeting of Boston Azure User Group</h1>
<h2>Guest speakers were Michael Stiefel and Mark Eisenberg</h2>
<h3>Meeting was held December 3, 2009 at the Microsoft NERD</h3>
<p>We opened with Boston Azure Theater, kicking off a few minutes after 6:00.  For around 45 minutes we watched a video of Microsoft Director Manuvir Das&#8217; PDC talk <a href="http://microsoftpdc.com/Sessions/P09-03">A Lap Around the Windows Azure Platform</a>.</p>
<p>From there, Microsoft&#8217;s Mark Eisenberg walked us through a summary of key Windows Azure announcements made at (or right before) the <a href="http://microsoftpdc.com">Microsoft PDC</a> in November. The deck Mark used is available <a href="http://codingoutloud.files.wordpress.com/2010/01/baug_pdchighlights.pptx">BAUG_PDCHighlights</a>. There was a lot of interest in the announcement details and in the pricing model.</p>
<p>Our keynote speaker, <a href="http://reliablesoftware.com/bio.html">Michael Stiefel</a>, followed with a detailed look into the project &#8220;<a href="http://www.microsoft.com/windowsazure/dallas/">Dallas</a>&#8221; announcement, showcasing the Dallas &#8220;Data as a Service&#8221; platform, working through sample apps, a custom mashup &#8211; with code, demonstrating the straight-forward programming model (ATOM feeds), and showing use of the data directly within Excel. Michael wrapped up by reviewing the business model &#8211; and discussing the interesting possibilities (publishers can publish &#8211; and others can consume &#8211; data <em>so much more easily</em> than today since Microsoft will have eliminated the &#8220;contract friction&#8221; we&#8217;d have if every consumer had to strike a deal with every publisher).</p>
<br />Posted in Boston Azure User Group, Programming, XML  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codingoutloud.wordpress.com/482/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codingoutloud.wordpress.com/482/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codingoutloud.wordpress.com/482/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codingoutloud.wordpress.com/482/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codingoutloud.wordpress.com/482/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codingoutloud.wordpress.com/482/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codingoutloud.wordpress.com/482/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codingoutloud.wordpress.com/482/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codingoutloud.wordpress.com/482/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codingoutloud.wordpress.com/482/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codingoutloud.wordpress.com/482/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codingoutloud.wordpress.com/482/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codingoutloud.wordpress.com/482/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codingoutloud.wordpress.com/482/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.codingoutloud.com&amp;blog=490667&amp;post=482&amp;subd=codingoutloud&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.codingoutloud.com/2010/01/27/december-2010-boston-azure-user-group-meeting-notes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/baf1296780d2798c1072e65aed8652d9?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">codingoutloud</media:title>
		</media:content>
	</item>
		<item>
		<title>Is &#8220;UTF-8&#8243; case-sensitive in XML declaration?</title>
		<link>http://blog.codingoutloud.com/2009/04/08/is-utf-8-case-sensitive-in-xml-declaration/</link>
		<comments>http://blog.codingoutloud.com/2009/04/08/is-utf-8-case-sensitive-in-xml-declaration/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 11:01:43 +0000</pubDate>
		<dc:creator>Bill Wilder</dc:creator>
				<category><![CDATA[XML]]></category>
		<category><![CDATA[utf]]></category>
		<category><![CDATA[UTF-8]]></category>

		<guid isPermaLink="false">http://codingoutloud.wordpress.com/2008/02/20/utf-8-utf-16-are-more-correct-as-upper-case-in-xml-declaration/</guid>
		<description><![CDATA[When declaring the encoding format for an XML document, all caps in the encoding is preferred over lowercase. Read full post for recommended approaches when reading and writing, as well as for the full background of relevant Internet-related standards.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.codingoutloud.com&amp;blog=490667&amp;post=5&amp;subd=codingoutloud&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At the beginning of an XML document, the <a href="http://www.w3.org/TR/2006/REC-xml-20060816/#dt-xmldecl">XML declaration</a> can optionally declare the document&#8217;s <em>encoding format</em>. This typically looks something like this:<br />
<code><br />
&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
</code></p>
<p>Sometimes you&#8217;ll see the encoding as &#8220;UTF-8&#8243; or &#8220;UTF-16&#8243; (all caps), sometimes as &#8220;utf-8&#8243; or &#8220;utf-16&#8243; (lowercase). Which is correct? Or are both correct? <strong>The short answer is that the uppercase variant is preferred</strong>, but both are allowed, though that does not ensure that both variants are widely <em>supported</em>. This suggests the following recommended approach:</p>
<p style="padding-left:30px;"><em><strong><span style="color:#0000ff;">Be forgiving when reading, strict when writing</span></strong>. When consuming XML, you are fully standards-compliant by supporting case-insensitive parsing of the encoding format. When producing XML, you are still standards-compliant </em><em>by generating an uppercase encoding format, while also</em><em> more likely to be readable by potential consumers.</em></p>
<p>Often the journey is more interesting than the destination when it comes to deciphering Internet standards; read on for the gory details.</p>
<div id="attachment_31" class="wp-caption alignleft" style="width: 233px"><img class="size-full wp-image-31" title="thinker-utf-8" src="http://codingoutloud.files.wordpress.com/2008/03/thinker-utf-8.jpg?w=510" alt="Hmmm... is &quot;UTF-8&quot; in upper case, or lower case?"   /><p class="wp-caption-text">Hmmm... should &quot;UTF-8&quot; be in uppercase, or is it lowercase?</p></div>
<p>At first blush, the lowercase usage appears consistent with XHTML (<a href="http://www.w3.org/TR/xhtml1/#h-4.2">which requires elements and attributes to be lowercase</a>) &#8211; but does this convention apply to an <a href="http://www.w3.org/TR/2006/REC-xml-20060816/#dt-xmldecl">XML </a><a href="http://www.w3.org/TR/REC-xml/#sec-pi">Processing Instruction</a> (which is <a href="http://www.http://en.wikipedia.org/wiki/Metadata">metadata</a>, not content)?</p>
<p>According to the W3C Recommendation for <a href="http://www.w3.org/TR/2006/REC-xml-20060816">Extensible Markup Language (XML) 1.0 (Fourth Edition)</a> section <a href="http://www.w3.org/TR/2006/REC-xml-20060816/#charencoding">4.3.3 Character Encoding in Entities</a>:</p>
<blockquote><p>&#8220;XML processors <em>SHOULD</em> match character encoding names in a case-insensitive way and <em>SHOULD</em> either interpret an IANA-registered name as the encoding registered at IANA for that name or treat it as unknown.&#8221;</p></blockquote>
<p>Looking up the values in the Internet Assigned Numbers Authority (IANA) <a href="http://www.iana.org/assignments/character-sets">registry</a> for the official spellings of the encoding values, you will find &#8220;UTF-8&#8243; and &#8220;UTF-16&#8243; &#8211; listed in uppercase. IANA also cross-references <a title="RFC 3629" href="http://www.faqs.org/rfcs/rfc3629.html">RFC-3629</a> which also goes with all caps. And all of the examples around the XML Recommendation seem to use uppercase exclusively.</p>
<p>So the uppercase versions appear to be the &#8220;right&#8221; ones.</p>
<p>But are the lowercase versions actually wrong? They <span style="font-style:italic;">might</span> be. The meaning of the word &#8220;SHOULD&#8221; in the above quoted text is governed by <a href="http://www.faqs.org/rfcs/rfc2119.html">RFC 2119</a> where it is defined to mean:</p>
<blockquote><p>&#8220;&#8230; that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.&#8221;</p></blockquote>
<p>If the writers of the XML specification wanted to insist that processors always treat this in a case-insensitive manner, the word &#8220;MUST&#8221; would have been used from <a href="http://www.faqs.org/rfcs/rfc2119.html">RFC 2119</a>.</p>
<p>So a processor <em>can</em> choose to ignore the part of the XML Recommendation where case-insensitive processing is suggested, and still be within the standard. A processor <em>must always </em>support uppercase; further, a processor <em>only</em> supporting uppercase is perfectly legal. Even if an uppercase only processor seems unlikely, I&#8217;m going to standardize on all caps when I create XML files.</p>
<p><strong>What about other character encodings, or what if one is not specified?</strong></p>
<p>A character encoding need not be explicitly specified; if it is not specified,  UTF-8 is default.</p>
<p>UTF-8 and UTF-16 are “universally” supported by XML parsers (by standard requirement); ISO-8859-1 is also often supported, but that char set is less complete (e.g., euro symbol missing).</p>
<p><a title="according to the UTF-8 entry in wikipedia" href="http://en.wikipedia.org/wiki/UTF-8">Wikipedia says</a>:</p>
<blockquote><p>“The root element can be preceded by an optional XML declaration. This element states what version of XML is in use (normally 1.0); it may also contain information about character encoding and external dependencies.</p>
<p>The specification requires that processors of XML support the pan-Unicode character encodings UTF-8 and UTF-16 (UTF-32 is not mandatory). The use of more limited encodings, such as those based on ISO/IEC 8859, is acknowledged and is widely used and supported.”</p></blockquote>
<p><strong>These details and conventions are important to anyone generating XML </strong>files, such as for bloggers and podcasters publishing in the RSS and ATOM formats.</p>
<p><strong>In summary</strong>, if you are producing XML files, it is best to output uppercase &#8220;UTF-8&#8243; and &#8220;UTF-16&#8243; since that is always known to be supported. If you are consuming XML files, it is advisable to accept both uppercase and lowercase variants since both are permissible within a strict interpretation of the, uh, &#8220;letter&#8221; of the standards. And if you are consuming XML files, be sure to handle the case where the optional encoding is not specified at all; the default value is &#8220;UTF-8&#8243; if nothing else is specified.</p>
<p>Also of interest:</p>
<ul>
<li><a href="http://www.rfc-ref.org/RFC-TEXTS/3629/index.html" rel="nofollow">RFC 3629 </a></li>
<li><a href="http://en.wikipedia.org/wiki/UTF-8">http://en.wikipedia.org/wiki/UTF-8</a></li>
<li><a href="http://htmlpurifier.org/docs/enduser-utf8.html" rel="nofollow">http://htmlpurifier.org/docs/enduser-utf8.html</a></li>
<li><a href="http://www.joelonsoftware.com/articles/Unicode.html" rel="nofollow">http://www.joelonsoftware.com/articles/Unicode.html</a></li>
<li><a href="http://guru.multimedia.cx/utf-8/" rel="nofollow">http://guru.multimedia.cx/utf-8/</a></li>
<li><a href="http://lists.evolt.org/archive/Week-of-Mon-20070409/189381.html" rel="nofollow">http://lists.evolt.org/archive/Week-of-Mon-20070409/189381.html</a></li>
<li><a title="The importance of being UTF-8" href="http://www.hanselman.com/blog/TheImportanceOfBeingUTF8.aspx">http://www.hanselman.com/blog/TheImportanceOfBeingUTF8.aspx</a></li>
</ul>
<p>Note added 29-March-2011:</p>
<p>Above it states &#8220;<em><strong>Be forgiving when reading, strict when writing</strong>.</em>&#8221; This is similar to <a href="http://en.wikipedia.org/wiki/Robustness_principle">Postel&#8217;s Law</a> (aka Robustness Principle), which states:</p>
<blockquote><p><em>Be conservative in what you send; be liberal in what you accept.</em></p></blockquote>
<p>Since mine is consistent with this, while also more specific, I will consider it simply an appropriate <a href="http://www.programmers-corner.com/article/46">specialization</a> of Postel&#8217;s Law and leave it as is.</p>
<p style="text-align:right;font-size:8px;">Blogged with <a title="Flock" href="http://www.flock.com/blogged-with-flock" target="_new">Flock</a></p>
<p>&nbsp;</p>
<p style="font-size:10px;text-align:right;">Tags: <a href="http://technorati.com/tag/xmlencoding" rel="tag">xmlencoding</a>, <a href="http://technorati.com/tag/%20creating%20podcast%20feeds" rel="tag">creating podcast feeds</a></p>
<p>&nbsp;</p>
<br />Posted in XML Tagged: utf, UTF-8, XML <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/codingoutloud.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/codingoutloud.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/codingoutloud.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/codingoutloud.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/codingoutloud.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/codingoutloud.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/codingoutloud.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/codingoutloud.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/codingoutloud.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/codingoutloud.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/codingoutloud.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/codingoutloud.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/codingoutloud.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/codingoutloud.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.codingoutloud.com&amp;blog=490667&amp;post=5&amp;subd=codingoutloud&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.codingoutloud.com/2009/04/08/is-utf-8-case-sensitive-in-xml-declaration/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/baf1296780d2798c1072e65aed8652d9?s=96&#38;d=monsterid&#38;r=G" medium="image">
			<media:title type="html">codingoutloud</media:title>
		</media:content>

		<media:content url="http://codingoutloud.files.wordpress.com/2008/03/thinker-utf-8.jpg" medium="image">
			<media:title type="html">thinker-utf-8</media:title>
		</media:content>
	</item>
	</channel>
</rss>
