You are not logged in.
Lost Password?


Register To Post



 Bottom   Previous Topic   Next Topic

#1
How to print umlauts?
Posted on: 2012/12/19 22:45
Administrator
Joined 2000/1/8
Germany
2539 Posts
Highscore Top10Highscore Top ScoreCoder#1 PosterHOTY09 1stLong Time User (15 Years) App Coder90+ Game Ratings
I have been trying to print text with umlauts (─, ÷, Ř, ...) from this extended ASCII font I posted a while ago:

http://www.planetvb.com/modules/newbb ... php?topic_id=3529&forum=9

It didn't work at all, all non-"basic" ASCII characters I tried to print to the screen remained blank. When trying to print their numerical values using itoa, they all showed the same number: 4294938624.

Does anybody have an idea what's going on there or what I could do to map the extended characters?
Top

#2
Re: How to print umlauts?
Posted on: 2012/12/24 21:15
VUE(xpert)
Joined 2012/12/4
418 Posts
CoderLong Time User (7 Years)
All ASCII characters fit in 7 bits. The international characters (including those with umlauts) in CP-850 as shown in the image are in the 128-255 range; the highest bit is set.

My guess is that something in the compiler is reading characters as bytes, sign extending them when that high bit is set, and is munging up your result accordingly.

It's hard to diagnose at a glance, but you might see some success if you use unsigned char variables instead of char variables.
Top

#3
Re: How to print umlauts?
Posted on: 2012/12/25 2:34
Administrator
Joined 2000/1/8
Germany
2539 Posts
Highscore Top10Highscore Top ScoreCoder#1 PosterHOTY09 1stLong Time User (15 Years) App Coder90+ Game Ratings
That was exacty the problem. The vbPrint function worked with char and u16, which I both changed to u8 and now its working.
In addition, the font I posted is not ISO 8859-1 (Latin-1), so I had to move all the extended characters around and add a bunch of new ones.

Thanks for the help!
Top

 Top   Previous Topic   Next Topic


Register To Post