<?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>Paul Turner &#187; Uncategorized</title>
	<atom:link href="http://paulturner.me/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://paulturner.me</link>
	<description>What was that again?</description>
	<lastBuildDate>Wed, 24 Mar 2010 13:49:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>WordPress code highlighting</title>
		<link>http://paulturner.me/2009/08/wordpress-code-highlighting/</link>
		<comments>http://paulturner.me/2009/08/wordpress-code-highlighting/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 14:45:43 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://paulturner.me/?p=158</guid>
		<description><![CDATA[I finally found a code highlighting plugin for WordPress that I like; CodeColorer. This works on the server side, so there is no need for JavaScript support on the client browser. The side effect of this is that I&#8217;ve had to re-visit all my previous posts to remove all the formatting I had manually applied.]]></description>
			<content:encoded><![CDATA[<p>I finally found a code highlighting plugin for WordPress that I like; <a href="http://kpumuk.info/projects/wordpress-plugins/codecolorer/">CodeColorer</a>.</p>
<p>This works on the server side, so there is no need for JavaScript support on the client browser.</p>
<p>The side effect of this is that I&#8217;ve had to re-visit all my previous posts to remove all the formatting I had manually applied.</p>
]]></content:encoded>
			<wfw:commentRss>http://paulturner.me/2009/08/wordpress-code-highlighting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Iñtërnâtiônàlizætiøn</title>
		<link>http://paulturner.me/2009/08/internationaliz%c3%a6ti%c3%b8n/</link>
		<comments>http://paulturner.me/2009/08/internationaliz%c3%a6ti%c3%b8n/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 14:39:28 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://paulturner.me/?p=140</guid>
		<description><![CDATA[Iñtërnâtiônàlizætiøn &#8211; This is string I found some time back which is very useful for testing internationalization issues. I can&#8217;t remember the original source of this. Please let me know if you know!]]></description>
			<content:encoded><![CDATA[<p>Iñtërnâtiônàlizætiøn &#8211; This is string I found some time back which is very useful for testing internationalization issues.  I can&#8217;t remember the original source of this.  Please let me know if you know! </p>
]]></content:encoded>
			<wfw:commentRss>http://paulturner.me/2009/08/internationaliz%c3%a6ti%c3%b8n/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reading HTTP POST data using BASH</title>
		<link>http://paulturner.me/2009/07/reading-http-post-data-using-bash/</link>
		<comments>http://paulturner.me/2009/07/reading-http-post-data-using-bash/#comments</comments>
		<pubDate>Fri, 31 Jul 2009 15:40:43 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://paulturner.me/?p=121</guid>
		<description><![CDATA[I recently needed to read the HTTP POST data using a BASH cgi script. When using BASH this way most of the HTTP variables are set as environment variables, and can be accessed simply. The exception is the HTTP POST data, this goes to the stdin stream. There were some examples of reading stdin like: [...]]]></description>
			<content:encoded><![CDATA[<p>I recently needed to read the HTTP POST data using a BASH cgi script.  </p>
<p>When using BASH this way most of the HTTP variables are set as environment variables, and can be accessed simply.  The exception is the HTTP POST data, this goes to the stdin stream.</p>
<p>There were some examples of reading stdin like:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">POST_DATA</span>=$<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">&lt;/</span>dev<span style="color: #000000; font-weight: bold;">/</span>stdin<span style="color: #7a0874; font-weight: bold;">&#41;</span></div></div>
<p>and</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">POST_DATA</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">cat</span> <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>stdin<span style="color: #000000; font-weight: bold;">`</span></div></div>
<p>However I found that these intermittently failed.  I believe this is because at the point of execution you can not guarantee that all the data has been sent.</p>
<p>The solution to this is to use the CONTENT_LENGTH environment variable to read the correct number of bytes:</p>
<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br />
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$REQUEST_METHOD</span>&quot;</span> = <span style="color: #ff0000;">&quot;POST&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$CONTENT_LENGTH</span>&quot;</span> <span style="color: #660033;">-gt</span> <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span>; <span style="color: #000000; font-weight: bold;">then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #c20cb9; font-weight: bold;">read</span> <span style="color: #660033;">-n</span> <span style="color: #007800;">$CONTENT_LENGTH</span> POST_DATA <span style="color: #000000; font-weight: bold;">&lt;&amp;</span><span style="color: #000000;">0</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">fi</span><br />
<span style="color: #000000; font-weight: bold;">fi</span></div></div>
]]></content:encoded>
			<wfw:commentRss>http://paulturner.me/2009/07/reading-http-post-data-using-bash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Outlook / Google Calendar synchronization</title>
		<link>http://paulturner.me/2009/03/outlook-and-google-calendar-synchronization/</link>
		<comments>http://paulturner.me/2009/03/outlook-and-google-calendar-synchronization/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 16:45:22 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://paulturner.me/?p=99</guid>
		<description><![CDATA[I&#8217;ve been using Google Calendar Sync for several weeks now and it has removed the headaches of having calendars in two places. Google Calendar Sync can be configured to do a 2-way synchronization, or a 1-way synchronization (in either direction). It is very quick to setup, and has very few options that need configuring. The [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a href="http://www.google.com/support/calendar/bin/answer.py?hl=en&#038;answer=89955">Google Calendar Sync</a> for several weeks now and it has removed the headaches of having calendars in two places.</p>
<p><a href="http://www.google.com/support/calendar/bin/answer.py?hl=en&#038;answer=89955">Google Calendar Sync</a> can be configured to do a 2-way synchronization, or a 1-way synchronization (in either direction).  It is very quick to setup, and has very few options that need configuring.<br />
<a href="http://paulturner.me/blog/wp-content/uploads/2009/03/googlecalendarsync.png"><img src="http://paulturner.me/blog/wp-content/uploads/2009/03/googlecalendarsync.png" alt="Google Calendar Sync" title="Google Calendar Sync" width="494" height="526" class="size-full wp-image-100" /></a><br />
The only improvement I would like is support for multiple calendars.  I would like 2-way synchronization for my work calendar, and 1-way synchronization from my other Google Calendars to my Outlook Calendar.</p>
]]></content:encoded>
			<wfw:commentRss>http://paulturner.me/2009/03/outlook-and-google-calendar-synchronization/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordTwit WordPress Plugin Installed</title>
		<link>http://paulturner.me/2009/02/wordtwit-wordpress-plugin-installed/</link>
		<comments>http://paulturner.me/2009/02/wordtwit-wordpress-plugin-installed/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 12:53:29 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://paulturner.me/?p=96</guid>
		<description><![CDATA[I have just installed the WordTwit WordPress Plugin. This post is primarily a test to check that it is all working.]]></description>
			<content:encoded><![CDATA[<p>I have just installed the <a href="http://www.bravenewcode.com/wordtwit/">WordTwit</a> WordPress Plugin.  This post is primarily a test to check that it is all working.</p>
]]></content:encoded>
			<wfw:commentRss>http://paulturner.me/2009/02/wordtwit-wordpress-plugin-installed/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The domain switch</title>
		<link>http://paulturner.me/2009/01/the-domain-switch/</link>
		<comments>http://paulturner.me/2009/01/the-domain-switch/#comments</comments>
		<pubDate>Fri, 30 Jan 2009 15:04:12 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://paulturner.me/?p=87</guid>
		<description><![CDATA[After much procrastination I have finally made the domain switch over to paulturner.me. All requests to the original domain paul-turner.net are automatically redirected to the correct page on the new domain with a &#8220;301 Moved Permanently&#8221; HTTP header. This means that all search engine traffic should be preserved, and the links updated over time. This [...]]]></description>
			<content:encoded><![CDATA[<p>After much procrastination I have finally made the domain switch over to <a href="http://paulturner.me/">paulturner.me</a>.</p>
<p>All requests to the original domain <a href="http://paul-turner.net/">paul-turner.net</a> are automatically redirected to the correct page on the new domain with a &#8220;301 Moved Permanently&#8221; HTTP header.</p>
<p>This means that all search engine traffic should be preserved, and the links updated over time.</p>
<p>This was achieved simply with mod_rewrite and a single index.php page:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&lt;?php</span><br />
<a href="http://www.php.net/header"><span style="color: #990000;">header</span></a><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Location: http://paulturner.me'</span><span style="color: #339933;">.</span><span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">,</span><span style="color: #009900; font-weight: bold;">TRUE</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">301</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000000; font-weight: bold;">?&gt;</span></div></div>
<p>Please update your links.</p>
]]></content:encoded>
			<wfw:commentRss>http://paulturner.me/2009/01/the-domain-switch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>paulturner.me</title>
		<link>http://paulturner.me/2009/01/paulturnerme/</link>
		<comments>http://paulturner.me/2009/01/paulturnerme/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 14:02:46 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://paul-turner.net/?p=79</guid>
		<description><![CDATA[A while ago I registered the domain paulturner.me for a few reasons: I don&#8217;t really like the hyphen in paul-turner.net. It&#8217;s a little more personal. I currently don&#8217;t own paul-turner.net.  (It&#8217;s owned by my web hosting company, although I have the option to purchase it) Currently http://paulturner.me/ redirects back to http://paul-turner.net/ although I have been [...]]]></description>
			<content:encoded><![CDATA[<p>A while ago I registered the domain <a href="http://paulturner.me/">paulturner.me</a> for<br />
a few reasons:</p>
<ol>
<li>I don&#8217;t really like the hyphen in <a href="http://paul-turner.net/">paul-turner.net</a>.</li>
<li>It&#8217;s a little more personal.</li>
<li>I currently don&#8217;t own <a href="http://paul-turner.net/">paul-turner.net</a>.  (It&#8217;s owned by my web hosting company, although I have the option to purchase it)</li>
</ol>
<p>Currently <a href="http://paulturner.me/">http://paulturner.me/</a> redirects back to <a href="http://paul-turner.net/">http://paul-turner.net/</a> although I have been considering a swap over for some time now.</p>
<p>If I do this my thoughts are to use mod_rewrite with a single PHP program that accepts all the requests from <a href="http://paul-turner.net/">http://paul-turner.net/</a> and responds with a permanent redirect to the same page on <a href="http://paulturner.me/">http://paulturner.me/</a>.</p>
<p>Are there any implications in doing this?  I would think that this approach would update all the search engines over time.</p>
<p>What do you think?  Leave me a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://paulturner.me/2009/01/paulturnerme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>7 Day Shop</title>
		<link>http://paulturner.me/2008/11/7-day-shop/</link>
		<comments>http://paulturner.me/2008/11/7-day-shop/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 21:03:59 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://paul-turner.net/?p=7</guid>
		<description><![CDATA[7 Day Shop have always provided good value photographic products, computer &#38; digital accessories (and more as well). I have used them several times in the past and they have always been reliable and efficient. They have recently announced that they are no longer charging for postage in the UK. This is great news!]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.7dayshop.com/">7 Day Shop</a> have always provided good value photographic products, computer &amp; digital accessories (and more as well).</p>
<p>I have used them several times in the past and they have always been reliable and efficient.  They have recently announced that they are no longer charging for postage in the UK.</p>
<p>This is great news!</p>
]]></content:encoded>
			<wfw:commentRss>http://paulturner.me/2008/11/7-day-shop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visual Basic 6, ActiveX and Unicode</title>
		<link>http://paulturner.me/2008/09/visual-basic-6-activex-and-unicode/</link>
		<comments>http://paulturner.me/2008/09/visual-basic-6-activex-and-unicode/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 14:59:08 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://paul-turner.net/?p=51</guid>
		<description><![CDATA[One of the older applications I support uses ActiveX controls embedded inside a web page.  These controls request data from a web server to update the information on the page without requesting the whole page again, much in the same way that AJAX is now commonly used. This has worked fine for the Latin code [...]]]></description>
			<content:encoded><![CDATA[<p>One of the older applications I support uses ActiveX controls embedded inside a web page.  These controls request data from a web server to update the information on the page without requesting the whole page again, much in the same way that AJAX is now commonly used.</p>
<p>This has worked fine for the Latin code pages (ISO8859-1, ISO8859-15), and for the double byte code page (cp950)  that have been tested.  However it did not work when I tried the UTF-8 Unicode code page.</p>
<p>The reason for this is fairly simple:</p>
<blockquote><p><a href="http://www.whippleware.com/VBLM/webhelp/vblm/vb__vblm___unicode.htm">VB stores strings internally using Unicode, but assumes that the outside world is ANSI.</a></p></blockquote>
<p>This means that Visual Basic will convert from ANSI to Unicode (UTF-16) when storing a string, and convert it back again when it is retrieved.</p>
<p>The ActiveX controls use the Microsoft Inet control to request data via HTTP.  This uses the GetChunck() method in the StateChanged event in order to read the data in to a string.  This was the first cause of my problems as Visual Basic will automatically convert the data in the string to ANSI, which loses the Unicode characters.</p>
<p>The Inet control GetChunck() method takes two parameters; size and data type.  The size parameter tells it how much data to read, and the data type parameter tells it what data type to read it in to.  The data was being read in to a string (icString), but to avoid the conversion I had to change this to a byte array (icByteArray) to avoid the automatic conversion process.</p>
<p>So far so good.  But now I had a UTF-8 byte array that I needed to convert in to a string without losing data in the conversion process.  This was a bit of a sticking point as Visual Basics string conversion function StrConv() can&#8217;t cope with UTF-8 and none of the API calls I found to convert the string worked.  You can assign a string equal to a byte array and no automatic conversion happens, but as strings are stored internally as UTF-16 this does not work.</p>
<p>I was nearly at the stage where I either needed to write my own conversion process, or re-develop the controls in another language with better UTF-8 support.</p>
<p>Then I found <a href="http://www.nonhostile.com/howto-convert-byte-array-utf8-string-vb6.asp">this solution</a>:</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000080;">Public</span> <span style="color: #000080;">Function</span> ConvertUtf8BytesToString(<span style="color: #000080;">ByRef</span> data() <span style="color: #000080;">As</span> <span style="color: #000080;">Byte</span>) <span style="color: #000080;">As</span> <span style="color: #000080;">String</span><br />
    <span style="color: #000080;">Dim</span> objStream <span style="color: #000080;">As</span> ADODB.Stream<br />
    <span style="color: #000080;">Dim</span> strTmp <span style="color: #000080;">As</span> <span style="color: #000080;">String</span><br />
<br />
    <span style="color: #008000;">' init stream<br />
</span>    <span style="color: #000080;">Set</span> objStream = <span style="color: #000080;">New</span> ADODB.Stream<br />
    objStream.Charset = <span style="color: #800000;">&quot;utf-8&quot;</span><br />
    objStream.Mode = adModeReadWrite<br />
    objStream.<span style="color: #000080;">Type</span> = adTypeBinary<br />
    objStream.<span style="color: #000080;">Open</span><br />
<br />
    <span style="color: #008000;">' write bytes into stream<br />
</span>    objStream.Write data<br />
    objStream.Flush<br />
<br />
    <span style="color: #008000;">' rewind stream and read text<br />
</span>    objStream.Position = 0<br />
    objStream.<span style="color: #000080;">Type</span> = adTypeText<br />
    strTmp = objStream.ReadText<br />
<br />
    <span style="color: #008000;">' close up and return<br />
</span>    objStream.<span style="color: #000080;">Close</span><br />
    ConvertUtf8BytesToString = strTmp<br />
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span></div></div>
<p>This does not use any APIs but requires the Microsoft ActiveX Data Objects 2.5 Library or later.</p>
<p>Using this solution I was able to assign the original internal string variable to the result of this function and the rest of the code in the controls worked.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">strWSConnectReturnData = ConvertUtf8BytesToString(bytWSConnectReturnData)</div></div>
<p>The ActiveX controls also read data values from the webpage and POST them back to the webserver.  The values are read via the DOM. These also need to be converted in the opposite direction, before they can be URL encoded.</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000080;">Public</span> <span style="color: #000080;">Function</span> ConvertStringToUtf8Bytes(<span style="color: #000080;">ByRef</span> strText <span style="color: #000080;">As</span> <span style="color: #000080;">String</span>) <span style="color: #000080;">As</span> <span style="color: #000080;">Byte</span>()<br />
&nbsp; &nbsp; <span style="color: #000080;">Dim</span> objStream <span style="color: #000080;">As</span> ADODB.Stream<br />
&nbsp; &nbsp; <span style="color: #000080;">Dim</span> data() <span style="color: #000080;">As</span> <span style="color: #000080;">Byte</span><br />
<br />
&nbsp; &nbsp; <span style="color: #008000;">' init stream<br />
</span> &nbsp; &nbsp;<span style="color: #000080;">Set</span> objStream = <span style="color: #000080;">New</span> ADODB.Stream<br />
&nbsp; &nbsp; objStream.Charset = <span style="color: #800000;">&quot;utf-8&quot;</span><br />
&nbsp; &nbsp; objStream.Mode = adModeReadWrite<br />
&nbsp; &nbsp; objStream.<span style="color: #000080;">Type</span> = adTypeText<br />
&nbsp; &nbsp; objStream.<span style="color: #000080;">Open</span><br />
<br />
&nbsp; &nbsp; <span style="color: #008000;">' write bytes into stream<br />
</span> &nbsp; &nbsp;objStream.WriteText strText<br />
&nbsp; &nbsp; objStream.Flush<br />
<br />
&nbsp; &nbsp; <span style="color: #008000;">' rewind stream and read text<br />
</span> &nbsp; &nbsp;objStream.Position = 0<br />
&nbsp; &nbsp; objStream.<span style="color: #000080;">Type</span> = adTypeBinary<br />
&nbsp; &nbsp; objStream.Read 3 <span style="color: #008000;">' skip first 3 bytes as this is the utf-8 marker<br />
</span> &nbsp; &nbsp;data = objStream.Read()<br />
<br />
&nbsp; &nbsp; <span style="color: #008000;">' close up and return<br />
</span> &nbsp; &nbsp;objStream.<span style="color: #000080;">Close</span><br />
&nbsp; &nbsp; ConvertStringToUtf8Bytes = data<br />
<span style="color: #000080;">End</span> <span style="color: #000080;">Function</span></div></div>
<p>This returns a byte array, and I pass it directly in to a function that URL encodes the byte array, returning a sting.</p>
<div class="codecolorer-container vb default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="vb codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000080;">String</span> = URLEncodeUTF8ByteArray( ConvertStringToUtf8Bytes( DomValue) )</div></div>
<p>Many thanks to <a href="http://www.nonhostile.com/">Tim Hastings</a> for his <a href="http://www.nonhostile.com/howto-convert-byte-array-utf8-string-vb6.asp">solution</a>, as this has saved me a lot of pain!</p>
]]></content:encoded>
			<wfw:commentRss>http://paulturner.me/2008/09/visual-basic-6-activex-and-unicode/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Ikea mobile phones</title>
		<link>http://paulturner.me/2008/08/ikea-mobile-phones/</link>
		<comments>http://paulturner.me/2008/08/ikea-mobile-phones/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 14:49:16 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://paul-turner.net/?p=36</guid>
		<description><![CDATA[Ikea has launched its own mobile phone service called Family Mobile (which piggybacks on the T-Mobile network). This is &#8220;pay as you go&#8221; service offering very competitive rates when compared to other UK providers. Basically it is a flat rate of 9p per minute whether you are calling a land line or another mobile phone, [...]]]></description>
			<content:encoded><![CDATA[<p>Ikea has launched its own mobile phone service called <a href="http://www.familymobile.co.uk/">Family Mobile</a> (which piggybacks on the T-Mobile network).  This is &#8220;pay as you go&#8221; service offering very competitive rates when <a href="http://www.familymobile.co.uk/uk-prices">compared</a> to other UK providers.</p>
<p>Basically it is a flat rate of 9p per minute whether you are calling a land line or another mobile phone, regardless of the network.  Text messages are also reasonable at 6p each.</p>
<p>The service allows you to automatically top up your balance when a pre-set minimum is reached, so there is no need to worry about buying top up vouchers, and as it is aimed at family usage you can have multiple phones on the same account.</p>
<p>If you need to buy a handset then their prices do look more expensive than other service providers, so it will probably be cheaper to bring an existing handset or buy one elsewhere and take their SIM only option.  </p>
<p>If you already have a phone that is compatible with the T-Mobile network then it should work, otherwise you may need to get your phone unlocked.  Your existing provider may be able to do this for a fee, alternatively you can try and do it yourself.  There are several sites on the internet that can give you the necessary information.  One example is <a href="http://unlockme.co.uk/">http://unlockme.co.uk/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://paulturner.me/2008/08/ikea-mobile-phones/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
