To be honest, I'm not sure if this is a .NET issue, some configuration on a PC, or a setting in a database but here goes:
Environment (have NO control over): XP (London & Tokyo),.NET 2.0 C#, 2 text files from different sources, 1 database [Sybase] (in Tokyo).
Working on GUI application (to be run in Tokyo) and Server exe (either in London or Tokyo).
Application works with strings which contain both English and Japanese (typically english word followed by Japanese word) text.
Server application loads data from files, performs some work, inserting the result into the database (using insert commands) from which the GUI retrieves the result.
As the server program is run, some interim results are output to a text box.
Problem 1:
Openned file A using 'sr = new StreamReader( fileName, Encoding.Default )',
Running server in London, the encoding of the file is reported as 'iso-8859-1' [sr.CurrentEncoding], while running same code in Tokyo it's reported as 'iso-2022-jp'
Running server in London; run GUI in london, the text looks corrupted but when the GUI is run in Tokyo, the text looks ok.
Running server in Tokyo, with the GUI's in each location produces the same result.
The textbox contains the same text as the GUI reports (London text looks corrupted, Tokyo ok).
Problem 2: [Same program]
File 'B' in a different format, openned using 'sr = new StreamReader( fileName, true)'. File type is reported as UTF-8 in both locations.
Running server in London, the GUI in both locations gives the same result for the text strings: '?????'.
Running server in Tokyo, gives correct display from Tokyo GUI but '?????' from London GUI.
The textbox contains the correct text regardless of where the server exe is run from.
Problem 1, I can sort of live with, but I really don't get problem 2. Perhaps something is happening to the text when it's inserted (ODBC) into the database? In which case, could I convert the text, perhaps into the same format as read from File A?