Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Upper and Lower for extended chars?

Author
Message
Felis Astrum
11
Years of Service
User Offline
Joined: 27th Sep 2012
Location: Melbourne
Posted: 8th Nov 2012 12:01
I haven't had success with using the Upper and Lower commands to convert the case of extended characters, so I'm guessing they only work up to 127. If this is the case, any chance the powers-that-be could include this in the next update?

I'm new. I bring cats for all.
AgentSam
12
Years of Service
User Offline
Joined: 14th Mar 2012
Location: Virtual Space
Posted: 8th Nov 2012 14:52 Edited at: 8th Nov 2012 14:55
There is a similar problem with the ASC() function.
The internal implementation appears to return a
"signed byte" value, whereas is should be using
"unsigned byte".

This is confirmed by the fact, that if you pass
a character with an ascii value of "255", then
Asc() returns "-1".

There are literally dozens and dozens of bugs like
this in AppGameKit! It would take me a week, to report
just the ones I've discovered myself.

Warning - flames and bad attitude inside



Here's a workaround for anyone using Asc() with
extended character sets...



As for the issue with Upper() and Lower(), it is
very simple to create replacement functions which
rely on a lookup table, and work with extended
characters.

Oh, of course it would be nice if these issues
were reported on the issues board. They WON'T be
picked up here, as we've all been assured of
many times before.

http://code.google.com/p/agk/issues/list

Cheers,
AgentSam
The Grumpy Old Software Engineer
JimHawkins
14
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 8th Nov 2012 23:11
I have some sympathy with AgentSam over this kind of issue. As the number of functions proliferates, the number of unforeseen or side-effect bugs also increases.

Really, these support functions are almost certainly easy to fix if they are pointed out. Anybody using T2 or Pascal is unlikely to use any of these calls.

Really, Unicode should be available - but if we can't get ANSI right, there's not much hope!

-- Jim DO IT FASTER, EASIER AND BETTER WITH AppGameKit FOR PASCAL
Felis Astrum
11
Years of Service
User Offline
Joined: 27th Sep 2012
Location: Melbourne
Posted: 9th Nov 2012 11:34
*unsure of how to respond to AgentSam's rant*
But that's okay, I am a big supporter of rants anywhere anytime. Thanks for posting the Asc() workaround.

Quote: "As for the issue with Upper() and Lower(), it is
very simple to create replacement functions which
rely on a lookup table, and work with extended
characters."


Yes, I figured I'd probably do this, but I thought I'd mention it anyway as it seemed like something that should be there, and it might save others some time. I haven't quite figured out when it's appropriate to raise an issue here or on the issues board. If I make noob posts I apologise. I can learn, though!

Quote: "As the number of functions proliferates, the number of unforeseen or side-effect bugs also increases."


This just makes me want to go on a nice holiday.

I'm new. I bring cats for all.

Login to post a reply

Server time is: 2024-05-07 11:13:51
Your offset time is: 2024-05-07 11:13:51