c# which is the correct Encoding type

  • Thread starter Thread starter G-Oker
  • Start date Start date
G

G-Oker

Guest
Hello,

I have a string I need to send to a device

│cn│1│101│

The "uprights" are alt-179 ASCII.

When I send this code, it results in a failure, and when I look at the devices log files, I can see it's getting

â??cnâ??1â??101â??

When I try the same code with the Manufacture's application, I can see its receiving

³cn³1³101³

Searching the internet, I have found pages that say alt 179 also equals ³ .


The code I am using is

Byte[] data = System.Text.Encoding.ASCII.GetBytes("│cn│1│101│");


I've tried replacing ASCII with

BigEndianUnicode,

unicode,

UTF7,

UTF8,

UTF32

But I do not get the superscript 3.


Could someone point out what I am doing wrong ? What do I need to change / add to convert │ 's into ³ .


Thank you

Continue reading...
 
Back
Top