Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error with NEWOBJECT()
Message
De
11/04/2008 15:05:05
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
11/04/2008 10:58:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
MySQL
Divers
Thread ID:
01308856
Message ID:
01310013
Vues:
22
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform