<?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/"
	>

<channel>
	<title>Blog &#187; stringbundle</title>
	<atom:link href="http://blog.cliffano.com/tag/stringbundle/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.cliffano.com</link>
	<description>Geeking, Living, Travelling</description>
	<lastBuildDate>Thu, 26 Jan 2012 10:18:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>XStringBundle NS_ERROR_FAILURE</title>
		<link>http://blog.cliffano.com/2008/11/16/xstringbundle-ns_error_failure/</link>
		<comments>http://blog.cliffano.com/2008/11/16/xstringbundle-ns_error_failure/#comments</comments>
		<pubDate>Sun, 16 Nov 2008 10:36:34 +0000</pubDate>
		<dc:creator>Cliffano Subagio</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[buildmonitor]]></category>
		<category><![CDATA[byte-order mark]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[l10n]]></category>
		<category><![CDATA[stringbundle]]></category>
		<category><![CDATA[utf-8]]></category>

		<guid isPermaLink="false">http://blog.cliffano.com/?p=260</guid>
		<description><![CDATA[I got this error message on Firefox Error Console after adding fr-FR locale to BuildMonitor, which caused it to fail initialising the status bar feeds. Googling gave me some clues but still nothing obvious to solve the problem. At first I thought it has something to do with the non-ASCII characters, so I did a [...]]]></description>
			<content:encoded><![CDATA[<p>I got this error message on Firefox Error Console after adding fr-FR locale to BuildMonitor, which caused it to fail initialising the status bar feeds.</p>
<pre class="brush: plain; title: ; notranslate">
1=&quot;[Exception...&quot; 2=&quot;Component&quot; 3=&quot;returned&quot; 4=&quot;failure&quot; 5=&quot;code:&quot; 6=&quot;0x80004005&quot; 7=&quot;(NS_ERROR_FAILURE)&quot; 8=&quot;[nsIStringBundle.&quot; 9=&quot;&lt;div&quot; id=&quot;:sd&quot; 10=&quot;class=&quot;ArwC7c&quot; 11=&quot;ckChnd&quot;&gt;GetStringFromName&quot; language=&quot;Error:&quot;]&quot;  nsresult: &quot;0x80004005 (NS_ERROR_FAILURE)&quot;  location: &quot;JS frame :: XStringBundle :: getString :: line 17&quot;  data: no] Source File: XStringBundle Line: 17&lt;/div&gt;
</pre>
<p>Googling gave me some clues but still nothing obvious to solve the problem. At first I thought it has something to do with the non-ASCII characters, so I did a binary-replace on the property values, but still no luck. It&#8217;s only after I cat-ed the file then I noticed an empty space before the first property key. This empty space turned out to be a weird character that didn&#8217;t show up on Eclipse text editor, gedit, and vi.</p>
<p>I still don&#8217;t know what that character is. Here&#8217;s what Eclipse compare editor showed when I compared the cleaned up line with the original line, notice the non-ASCII character before monitor.init property key.</p>
<p><img class="alignnone" src="http://lh3.ggpht.com/_fXOvW0MYmrY/SRwmcm80fdI/AAAAAAAABgI/4kCOmUPvdKk/s400/unknownchar.jpg" alt="" width="400" height="101" /></p>
<p>And BuildMonitor speaks French after that character is removed. Parlez-vous anglais?</p>
<p><img class="alignnone" src="http://lh6.ggpht.com/_fXOvW0MYmrY/SRwmcYV0VuI/AAAAAAAABgA/V20aR6_D9hc/s400/fr-FR.jpg" alt="" width="286" height="168" /></p>
<p><strong>Update (20/11/2008):</strong> This problem kinda irked me, so I investigated it further.</p>
<p>The weird character is actually the ISO-8859-1 character for UTF-8 <a href="http://en.wikipedia.org/wiki/Byte-order_mark">byte-order mark</a>. It seems like XStringBundle expects ISO-8859-1 property file, hence interpreting the BOM as part of the monitor.init property key.</p>
<p>A handy tool to inspect the BOM is <a href="http://www.gsp.com/cgi-bin/man.cgi?section=1&amp;topic=od">octal dump</a>, where you should be able to see EF BB BF hex at the beginning of the file. And instead of manually cleaning up the property key, I should&#8217;ve used <a href="https://native2ascii.dev.java.net/">native2ascii</a>.</p>

<p class="FacebookLikeButton"><fb:like href="http%3A%2F%2Fblog.cliffano.com%2F2008%2F11%2F16%2Fxstringbundle-ns_error_failure%2F" layout="standard" show_faces="false" width="450" action="like" colorscheme="light"></fb:like></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.cliffano.com/2008/11/16/xstringbundle-ns_error_failure/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

