Sunday, 21 September 2014

Fun with codepages, unicode and encoding

...or how to survive in the encoding jungle, with some helpful tools.

I have several times stumble into encoding issues between legacy applications and modern "Unicode" capable ones.

In the following I will try to explain the basics in a simple way - and also supply the source and binary (if there are anyone out there that needs the utility - but don't need a compiler) for a small utility that takes a file containing Unicode characters and encodes it into a given code page. I was a bit surprised that I wasn't able to find such a utility at that time - so I did one to solve the problem.

Tuesday, 2 September 2014

XE7 - already new version of Delphi - again!!

...or why you should consider getting a software assurance license, use the recharge option or just try out the newer versions of Delphi.

This small post is just a list of reasons why you might consider to keep your RAD Studio/Delphi/C++Builder license up-to-date. So no technical topic - just a bit of reasoning and my own opinions - and unless you chose to use the "Delphi Ad" in the top right corner of this page - I have no economical interest in you keeping your licenses up-to-date. :-)

Delphi has at a point in time been rumored dead - and many abandoned ship to, at that time, more popular languages - but I guess perseverance will prevail.

But popular doesn't mean better or worse - I am more the "I know what I like" type - to use the title of an old Genesis song. Having used a variety of programming languages and IDEs - the Delphi dialect and IDE is still after almost 20 years, my favorite choice. And here is some reasons why:

Thursday, 21 August 2014

Introducing the REST Debugger....

- or How I helped a friend make his first REST client.

A good friend of mine, had finally decided to do some REAL programming :-D - and had for that purpose purchased a Delphi XE6 - and being relative new to the environment and hadn't looked into Delphi since version 7 - it is my privilege to help him getting started.

I had hoped for a "hello world" scenario, but he actually wanted to try to start off with a REST client against something like Google Translate.

Friday, 18 July 2014

Redirecting or capturing output from processes

- or How to add achievements in ScummVM.

Have you ever had the need to redirect output from a console application into your application, either for monitoring, integration or "user friendliness"?

I will walk through 2 scenarios - and sprinkle them with a bit of extras.

Sunday, 22 June 2014

Using Google Chromecast from Delphi desktop application

I have done a small example of a desktop application, starting the YouTube app on the Chromecast device and playing a video on your TV. Using some Indy components and a couple of the new REST components that came with XE6. Not bothering with the API's from Google.

This example does not really have any real life usage - since installing Google cast in your Chrome browser or using the YouTube app on your phone would make more sense. So unless you for some reason don't use Chrome as a browser or do not have an iOS or Android phone, this example is not that useful - but it shows the concept.

And I think that the Chromecast is a nice $30 device, that like "almost" anything else can be accessed from Delphi :-D (Update: I might end up using Mozilla's cast device, if the rumors are true - see update at the end of post).

Wednesday, 7 May 2014

Back'n'Front App - dual camera "fun"

Two weeks ago there was an App mentioned in a local newspaper - which, apparently, had done pretty well and which now is available also on Android. The app was described as taking 2 photos - one with the front camera and one with the back camera of your phone - and then enabling you to share the result with the rest of the world. How hard could it be to build one yourself?

Monday, 21 April 2014

Fun with Delphi XE6 App tethering and barcodes

Updated: Removed broken GDrive links, now linking to old GitHub repo.

One of the new key features in XE6 is what Embarcadero has chosen to call App Tethering components - the only problem I initially had with the name was that it implied that mobile had to be involved in some way - which is not the case. You can make a windows service that is a "receiver" from a desktop application running on the same sub-net.

An example could be POS systems, running on various devices talking to the same receiver - without bothering about implementing multiple communications protocols - these components all wraps this up nicely.

I wanted to give these new component a try, by making a very simple barcode scanner using my phone as the barcode scanner and then have the receiver send the barcode to whatever application was active.

A word of warning: this is a prof of concept - not ready for production or deployment - you need to do some work yourself to make it fit your needs. I have tried to use as little code as possible - leaving out all exception handling :-).

Sunday, 20 April 2014

How to upload data from Growatt inverter to using a Raspberry Pi.

Updated: 16-07-2019 - referring to updated files on

Uploading data from your solar inverter to a site like can have have the benefit of letting you monitor your power output from anywhere, comparing data with other systems around the world from various other vendors or just simply to keep track.

I have prepared a walk-through on how to use a Raspberry Pi to upload your Growatt inverter data together with weather data to More technical skilled people might find this guide too detailed - they are welcome to grab the goodies at the end or ignore the whole thing :-)

Thursday, 17 April 2014


Like a lot of other people I do have some things on my mind I think others could benefit from knowing, or they could point me to an even better solution than the ones I present here - because I am sure there is.

I have over the years been using a number of computer languages - but the majority of the time it has been the Delphi dialect of Object Pascal - so expect that to show in the posts.