<?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>Olaf&#039;s blog &#187; Charset</title>
	<atom:link href="http://olafsblog.sysbsb.de/tag/charset/feed/" rel="self" type="application/rss+xml" />
	<link>http://olafsblog.sysbsb.de</link>
	<description>Olaf&#039;s blog on software development and life</description>
	<lastBuildDate>Thu, 18 Nov 2010 07:57:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Obtaining the default charset (aka platform encoding) in JAVA</title>
		<link>http://olafsblog.sysbsb.de/obtaining-the-default-charset-aka-platform-encoding-in-java/</link>
		<comments>http://olafsblog.sysbsb.de/obtaining-the-default-charset-aka-platform-encoding-in-java/#comments</comments>
		<pubDate>Mon, 09 Nov 2009 10:57:09 +0000</pubDate>
		<dc:creator>olaf</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[Charset]]></category>
		<category><![CDATA[Platform encoding]]></category>

		<guid isPermaLink="false">http://olafsblog.sysbsb.de/obtaining-the-default-charset-aka-platform-encoding-in-java/</guid>
		<description><![CDATA[&#8230; is really simple since JDK 1.5:

java.nio.charset.Charset.defaultCharset()

So please don&#8217;t use messy, old workarounds such as this:

byte [] byteArray = {'a'};
InputStream inputStream = new ByteArrayInputStream(byteArray);
InputStreamReader reader = new InputStreamReader(inputStream);
String defaultEncoding = reader.getEncoding();

Which, unfortunately, is one of the first things you stumble upon when searching for this topic.
]]></description>
			<content:encoded><![CDATA[<p>&#8230; is really simple since JDK 1.5:</p>
<pre class="brush: java;">
java.nio.charset.Charset.defaultCharset()
</pre>
<p>So please don&#8217;t use messy, old workarounds such as this:</p>
<pre class="brush: java;">
byte [] byteArray = {'a'};
InputStream inputStream = new ByteArrayInputStream(byteArray);
InputStreamReader reader = new InputStreamReader(inputStream);
String defaultEncoding = reader.getEncoding();
</pre>
<p>Which, unfortunately, is one of the first things you stumble upon when searching for this topic.</p>
]]></content:encoded>
			<wfw:commentRss>http://olafsblog.sysbsb.de/obtaining-the-default-charset-aka-platform-encoding-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

