I'm writing strings to an embedded console that only supports Extended ASCII
Code Page 437.
The strings are stored in a lookup table in a database .
My original code is as follows which writes to a memory stream:
System.Text.ASC IIEncoding Encoding = new System.Text.ASC IIEncoding();
MachineIDs.Writ e(Encoding.GetB ytes(EquipmentR ecord.LabelID)) ;
MachineIDs.Writ e('\0');
MachineIDs.Writ e(Encoding.GetB ytes(EquipmentR ecord.EnglishDe sc));
MachineIDs.Writ e('\0');
MachineIDs.Writ e(Encoding.GetB ytes(EquipmentR ecord.GermanDes c));
MachineIDs.Writ e('\0');
The above code isn't writing using the correct code page.The german 'ΓΌ' char
0xFC is being written as char 0x3F using the above.
How do I specify a code page please?
thanks
Claire
Code Page 437.
The strings are stored in a lookup table in a database .
My original code is as follows which writes to a memory stream:
System.Text.ASC IIEncoding Encoding = new System.Text.ASC IIEncoding();
MachineIDs.Writ e(Encoding.GetB ytes(EquipmentR ecord.LabelID)) ;
MachineIDs.Writ e('\0');
MachineIDs.Writ e(Encoding.GetB ytes(EquipmentR ecord.EnglishDe sc));
MachineIDs.Writ e('\0');
MachineIDs.Writ e(Encoding.GetB ytes(EquipmentR ecord.GermanDes c));
MachineIDs.Writ e('\0');
The above code isn't writing using the correct code page.The german 'ΓΌ' char
0xFC is being written as char 0x3F using the above.
How do I specify a code page please?
thanks
Claire
Comment