Extended ASCII

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following code
for (byte i = 126; i < 159; i++

char c = (char)i
textBox1.Text += i + " " + c +" \r\n";

But this shows me no Umlaut (ä,ö,ü
How can I enable that I can get some umlaut's out of this?
 
"Pete" wrote
But this shows me no Umlaut (ä,ö,ü)
How can I enable that I can get some umlaut's out of this?

"Extended ASCII" never had any standardized way of where to map "our"
letters.

A char in .NET is using Unicode, which for us northern folks means that our
letters is in the area much further up in the list, e.g.:

214:Ö
220:Ü
228:ä
229:å
246:ö
252:ü

Maybe you've heard of Latin-1, which is included in Unicode.

// Bjorn A
 
thread.CurrentCulture
thread.CurrentUICulture

Pete said:
Thx, got this.

The reason is one step further: I am reading an MQ Series stream to get
messages. The messages have thoes umlaut in it.
When I read it, I never get the original character. For example, when
reading the queue as array of bytes I have get the value 129, which is in
the "ü" that I've put in the queue.
But all I get when I put this in the textbox is a square, meaning not a
real value I can present. Even when I read the queue as
 
Pete said:
The reason is one step further: I am reading an MQ Series stream to
get messages. The messages have thoes umlaut in it.
When I read it, I never get the original character. For example, when
reading the queue as array of bytes I have get the value 129, which
is in the "?" that I've put in the queue.
But all I get when I put this in the textbox is a square, meaning not
a real value I can present. Even when I read the queue as
String s= queue.ReadString( queue.length )
I do not get the "?"

You need to work out what encoding the original stream was written in.
It may well have been written in the default encoding for your
platform, in which case you need to specify Encoding.Default when you
create the reader on the stream.
 
Back
Top