Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error with NEWOBJECT()
Message
From
11/04/2008 15:05:05
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
11/04/2008 10:58:24
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
MySQL
Miscellaneous
Thread ID:
01308856
Message ID:
01310013
Views:
21
>One problem that I see in using anything other than "A".."Z", "a".."z", "0".."9", and "_" in identifiers is that you run the risk of code not running in anything but the codepage you were using at the time when you originally wrote the code. This would especially be true with Asian languges like Chinese, Japanese and Korean -- mainly because of the double-byte character system used (where typically the "lead-in" characters are in the upper-ASCII range).

I did that because I could, and didn't really bother to change, the code simply stayed like that - and it was delivered only on machines where we controlled the environment, i.e. the system codepage, keyboard layout etc. There was no problem with that - but I figure anyone who stole the code would run into trouble ;), because those guys usually never bother to use the five extra characters (of CP 1250) that our language uses, for them kućevlasnik (house owner) and kučevlasnik (puppy owner) are spelled kucevlasnik (a non-word), so they keep their machines at US English. That would teach them ;).

> the code once more revealed what the problem was. The syntax errors were occurring in places where there were string constants that contain characters in the upper-ASCII range -- which are often used as "lead-in" characters for double-byte sequences. Essentially what was happening was whenever the character immediately preceding the closing quote was being intepreted as a "lead-in" for a double-byte character, the closing quote would get "eaten" -- thus resulting in the syntax error.

So you padded it with an extra character, or what was the solution?

>There is one other thing with double-byte characters that you could run into -- files that seem to be inaccessible because there are "illegal" characters in the filename. I've often seen this happen when you try to access discs that were originally meant for Japanese or Chinese systems and the files are named using double-byte sequences. Usually you can still access the file by the short DOS filename.

My last gripe about TotalCommander was that it wouldn't exactly recognize filenames containing Cyrillic, which I do have a few of. That was the only remaining reason to open Windows Ex. Now in version 7 that's also fixed - but then there's my gripe that Fox is running one codepage at a time.

>Of course all this would be moot if we were using Unicode...

I wish...

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform