OK, I must admit – I live in a strange country where we are using this all fancy characters called diacritical characters. If You would spot some Polish text on the Internet, You will notice some fancy characters like ą,ś,ł etc.
In early computer age time (which was a little later then outside of Eastern Europe) we had a few different encodings, now we have two main left, Windows encoding (CP1250) and ISO (ISO-8859-2).
So what is a purpose of this post. In my last assignment I had to manage user’s identity in some access control system which was deployed at customer’s network. This was door cards control system, and we are using software which exported data from this software internal database to MS SQL database, where we were able to access, read and write data. One problem – polish characters were translated to some nasty encoding, and data in this database were kept as char not nchar or nvarchar data. So all information about encoding was lost and no one was able to told us in which encoding this is stored, how it translated etc. We tried all options with setting translation on SQL client side etc, nothing worked for us. After few tries we figured out this all details, and now it works fine. But why it was broken, probably because some developer had ever thought about the case where this software will be used in the country which uses some additional characters.
In the same time I’ve ordered few book (among them The .NET Developer's Guide to Directory Services Programming (Microsoft Net Development Series and Active Directory, 3rd Edition which are both very good ) from Amazon. What I’ve spotted on the package and transport letter was lack of any Polish specific characters which was entered in billing and delivery address, and which can be perfectly visible on their web site. Why it is broken on labels? Probably the same reason, developer who wrote code to handle label printing wasn’t paying any attention to other character sets than English. I have a little ask at the end for all who are reading this post and are involved in architecting \ developing \ testing software. Please all of You remember that there are peoples on this world which are using some fancy looking diacritical characters.
And to make this post a little more technical in attachment I’ve posted simple subroutine to convert characters from one encoding into another written in C#, nothing really complicated but maybe someone will find it useful.