<?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>Saiweb &#187; BOM</title>
	<atom:link href="http://www.saiweb.co.uk/tag/bom/feed" rel="self" type="application/rss+xml" />
	<link>http://www.saiweb.co.uk</link>
	<description>Ramblings of a Sys admin</description>
	<lastBuildDate>Mon, 06 Feb 2012 14:57:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Sysamin &#8211; iconv update</title>
		<link>http://www.saiweb.co.uk/linux/sysamin-iconv-update</link>
		<comments>http://www.saiweb.co.uk/linux/sysamin-iconv-update#comments</comments>
		<pubDate>Thu, 10 Sep 2009 10:40:59 +0000</pubDate>
		<dc:creator>Buzz</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[BOM]]></category>
		<category><![CDATA[charset]]></category>
		<category><![CDATA[conversion]]></category>
		<category><![CDATA[iconv]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://www.saiweb.co.uk/?p=777</guid>
		<description><![CDATA[I had a major issue facing the iconv functionality of the sysadmin toolset namely due to rushed coding. When loading a file to be re-encoded the entire file was loaded into the buffer, encoded as whole and written out to the new file, this of course meant the  memory usage was roughly double the size [...]]]></description>
			<content:encoded><![CDATA[<p>I had a major issue facing the iconv functionality of the <a href="http://www.saiweb.co.uk/sysadmin">sysadmin toolset</a> namely due to rushed coding.</p>
<p>When loading a file to be re-encoded the entire file was loaded into the buffer, encoded as whole and written out to the new file, this of course meant the  memory usage was roughly double the size of the file to be converted plus any overheads to do with the encoding itself.</p>
<p>Today I had need to convert a 1.3GB sql file, needles to say the script was crashing out with a memory error.</p>
<p>As such I have now completely re-written the function it now processes the file in 1kb &#8216;chunks&#8217;, moving the load to the CPU, this process is now very cpu intensive the the memory overhead is minimal (during test processed the 1.3GB file using 113kb of memory!!!).</p>
<p><div id="saiweb_6de35baffde4579190e22074d228b54c" style="width:487px; height:417px;"></div><script language="Javascript" type="text/javascript">
	WPFP(document).ready(function() {
		//load player
		$f("saiweb_6de35baffde4579190e22074d228b54c", "/wp-content/plugins/wordpress-flowplayer/flowplayer/gpl/flowplayer-3.1.5.swf", {
				plugins: {
  					 controls: {    					
      					
      					
      					
      					sliderGradient: 'none',
      					progressGradient: 'medium',
      					
      					
      					backgroundColor: '#141648',
      					
      					
      					backgroundGradient: 'none',
      					bufferGradient: 'none',
   						opacity:1.0
   						}
				},
			clip: {
					url:'http://cdn.saiweb.co.uk/wp-content/uploads/2009/09/sysadmin-iconv.mp4',
					autoPlay: false,
       				autoBuffering: false
				},
				canvas: {
					backgroundColor:''
				}})
			});</script>
				</p>
<p>Also I have now added BOM (Byte order mark) detection:</p>
<p><div id="saiweb_110ee6ad0b3da89993dcf49ecf7930ba" style="width:515px; height:473px;"></div><script language="Javascript" type="text/javascript">
	WPFP(document).ready(function() {
		//load player
		$f("saiweb_110ee6ad0b3da89993dcf49ecf7930ba", "/wp-content/plugins/wordpress-flowplayer/flowplayer/gpl/flowplayer-3.1.5.swf", {
				plugins: {
  					 controls: {    					
      					
      					
      					
      					sliderGradient: 'none',
      					progressGradient: 'medium',
      					
      					
      					backgroundColor: '#141648',
      					
      					
      					backgroundGradient: 'none',
      					bufferGradient: 'none',
   						opacity:1.0
   						}
				},
			clip: {
					url:'http://cdn.saiweb.co.uk/wp-content/uploads/2009/09/sysadmin_oconv_bom.mp4',
					autoPlay: false,
       				autoBuffering: false
				},
				canvas: {
					backgroundColor:''
				}})
			});</script>
				<span style="float: left;" ><a class="twitter-share-button"  data-via="Saiweb" data-count="horizontal" data-related="Saiweb:David Busby" data-lang="en" data-url="http://www.saiweb.co.uk/linux/sysamin-iconv-update" data-text="Sysamin &#8211; iconv update" href="http://twitter.com/share?via=Saiweb&#038;count=horizontal&#038;related=Saiweb%3ADavid%20Busby&#038;lang=en&#038;url=http%3A%2F%2Fwww.saiweb.co.uk%2Flinux%2Fsysamin-iconv-update&#038;text=Sysamin%20%26%238211%3B%20iconv%20update" >Tweet</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.saiweb.co.uk/linux/sysamin-iconv-update/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using apc
Database Caching 4/12 queries in 0.074 seconds using apc
Object Caching 549/562 objects using apc
Content Delivery Network via Rackspace Cloud Files: cdn.saiweb.co.uk

Served from: www.saiweb.co.uk @ 2012-02-07 16:28:28 -->
