D
Duncan M
Hi all,
I have seen a similar post to this in the past but no resolution. I
will explain fully my problem:
I am writing a text editor that will be used in several regions around
the world but my testing will be done in Turkey (I am in GB). The
output of this editor will be used in a DOS enviroment so any hint of
it outputting unicode is out of the question.
Before writing the application I requested a file from a turkish
client to be generated in notepad with all the letters of the alphabet
and any special Turkish characters. I then generated a screen font for
the DOS enviroment which mapped the special characters values (all
above 128) to their graphical representations. So far good.
I then moved on the create the application. Origonally for IO I used a
pair of StreamReaders / Writers with encoding set to Encoding.ASCII.
Obviously this scheme only appreciates ASCII values within the 7 bit
range - noo good as 129+ spilled over into 2 bytes.
I next tried Encoding.Default, this behaves very strangley – it saves
single byte values on my machine and 2 byte values on the Turkish
machine. Still not good enough then.
I am desperate to find a solution to this, I would simply like to
output all charcters in the 8 bit character mapping scheme that is
used by NOTEPAD!! Surely this is easy. I know I can get to the ANSI
codepage as follows:
TextInfo ti = CultureInfo.CurrentCulture.TextInfo;
ti.ANSICodePage;
But what now!!!
I would appreciate any advice anybody can give me.
I have seen a similar post to this in the past but no resolution. I
will explain fully my problem:
I am writing a text editor that will be used in several regions around
the world but my testing will be done in Turkey (I am in GB). The
output of this editor will be used in a DOS enviroment so any hint of
it outputting unicode is out of the question.
Before writing the application I requested a file from a turkish
client to be generated in notepad with all the letters of the alphabet
and any special Turkish characters. I then generated a screen font for
the DOS enviroment which mapped the special characters values (all
above 128) to their graphical representations. So far good.
I then moved on the create the application. Origonally for IO I used a
pair of StreamReaders / Writers with encoding set to Encoding.ASCII.
Obviously this scheme only appreciates ASCII values within the 7 bit
range - noo good as 129+ spilled over into 2 bytes.
I next tried Encoding.Default, this behaves very strangley – it saves
single byte values on my machine and 2 byte values on the Turkish
machine. Still not good enough then.
I am desperate to find a solution to this, I would simply like to
output all charcters in the 8 bit character mapping scheme that is
used by NOTEPAD!! Surely this is easy. I know I can get to the ANSI
codepage as follows:
TextInfo ti = CultureInfo.CurrentCulture.TextInfo;
ti.ANSICodePage;
But what now!!!
I would appreciate any advice anybody can give me.