Saturday, December 15, 2012

A periodic problem

I had an email from a KComm user from Russia today. He reported that when he clicks on a spot in the DX Cluster window the message "Invalid floating point operation" appears.

I guessed immediately what the cause of this was. It's a problem that has been the bane of my life ever since I started programming as a hobby. In most of Europe the character used for the decimal point is a comma, not a dot (or period as our American friends say.) If your program is being used in a European country, adopts the correct regional settings and then reads some data expressed in the US or British way (such as the frequency in a DX Cluster spot) when it tries converting data to a binary floating point value it will come up with an error. If the European Union was actually any use you might think they would have standardized the representation of numbers by now, but hey...

If you are affected by this issue then a workaround is to use the Regional Settings in Control Panel to change the decimal separator to a dot instead of a comma. I've looked at the KComm source code and fixing the problem doesn't look as if it is going to be easy so a solution may be a little while in coming.
Post a Comment