This site is no longer active and is available for archival purposes only. Registration and login is disabled.

strange effects


strange effects

Postby Henrik » Jan 18, 2002 @ 7:22pm

Hi,

i had some weird 'side effects' when trying to progam my first 'hello world application' with EasyCE 1.5 . Some variables got changed without me touching them ! I debugged a little bit and encountered the following problem:

The redir-table in the EasyCE-function initcharset() is a char-array. When your compiler uses char as signed char you will get negative indices when performing 'for ( i = 0; i < 57; i++ ) m_transl[c[i]] = i;' because of some characters that have a set d7-bit (for example 'ö') !

To solve the problem you should write 'byte c[]...' instead of 'char c[]...' in the same function.

Any comments or suggestions ?

BTW very easy tool, i like it :)

greetings
--Henrik
Henrik
 


Postby BartCB » Jan 18, 2002 @ 10:13pm

Hi Henrik,

I send a post two weeks ago about this problem. It seem that there is few people how have this bug with ö.

Do you have an english version of PocketPC ? (I have a French one, and perhaps with different languague, the ö isn't recognize... In french, there is an advance ASCII table, and the value of ö is probably more than 256, and so, it explains the byte instead of char !)


BartCB
BartCB
pm Member
 
Posts: 4
Joined: Jan 6, 2002 @ 2:35pm


Postby Guest » Jan 19, 2002 @ 11:24am

Hi BartCB,

now i found your posting refering to the problem mentioned above ( i had tomatoes on my eyes (german proverb)).

I own a E-125G with WinCE in german language

and have the following codes:
'ä'=0xe4=byte(228)=signed char(-28)
'ü'=0xfc=byte(252)=signed char(-4)
'ö'=0xf6=byte(246)=signed char(-10)

Do english PocketPCs have different codes !?!

When you follow my suggestion above (byte c[]...) everything works fine in EasyCE-initialization. But you have to be careful when using EasyCE-functions that print texts (for example centre()), because negative indices may occur when printing 'ä','ö' or 'ü'.

Or set your compiler to interpret chars as unsigned chars !

greetings
--Henrik
Guest
 


Postby Phantom » Jan 19, 2002 @ 12:31pm

Guys,

I'm aware of this problem, and it's fixed, but I'm not sure that it's fixed in EasyCE 1.6 (file http://www.pocketmatrix.com/phantom/easyce16.zip , as soon as PocketMatrix is online again), but in case it's not: The problem is that 'char' seems to be signed in EVC/VC6. So if you change that to 'unsigned char', the bug is gone.

EasyCE 1.7 won't have this problem.

- Jacco.
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Postby Dan East » Jan 19, 2002 @ 3:02pm

Jacco, the site is back up, but you will have to re-upload your site, because Verio hosting closed the original site prematurely before PocketMatrix could move things over. I had the same problems with the dex-plor.com site, and the dexplor components are still not up for download yet. :(

The email address I have for you no longer works. If you would, send your new address to dan@pocketmatrix.com. I think Chris (chris@pocketmatrix.com) needs it too. Thanks!

Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby Phantom » Jan 20, 2002 @ 11:44am

I changed jobs. I can be reached at:
JaccoBikker@Hotmail.com (semi-permanently), or
Jacco@GreenDino.nl (for as long as I work there :) ).
The green dino address will get you a faster response, as I am monitoring that all day. ;).

- Jacco.
Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Return to Phantom's Forum


Sort


Forum Description

Discuss any of Phantom's projects here (Operation Nutcracker, etc.)

Moderators:

sponge, RICoder, Phantom

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum