I have written an application using Delphi 5. I have a user in Yemen who has been entering patient names into the program for years in Arabic. I have done nothing in my own coding to support this, but apparently it works for him. The characters end up encoded inside the string with characters like chr(227), chr(228), chr(213) etc. For years, when I display these names on the screen, they appear in Arabic, just as he wishes.
Suddenly, in just one place in the software (a TStringGrid), when I display the name, it now appears using Chinese letters instead of Arabic letters. Again, I did nothing to command Delphi to do this. I have no idea why this is happening. I can reproduce the problem on my own computer (Windows 7 using its default settings, not changing the control panel region and language to anything else). The font of the TStringGrid is 'System' with CharSet of 1 (the default), point size of 10; the other location is a TEdit with the same Font ('System'), CharSet of 1, point Size of 10. I can't see anything that I changed inside my own code involving this step which would change the way it displays text. The problem also occurs on his computers which are running Windows XP.
I discovered that if I change the charset of the TStringGrid to 178 (ARABIC_CHARSET) I can force Delphi to display the names in a script form of Arabic, but it does look different from the printed form of Arabic which appears in the TEdit.
In any case, I am not telling Delphi to use Unicode or any other fancy thing, and I simply have no idea why it would suddenly decide to display in Chinese rather than Arabic. Does anyone know why, or any other way around this issue?
This does not involve using the Internet at all; it simply runs on a computer.