Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filter out garbage characters
Message
De
11/12/2007 00:54:02
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01269971
Message ID:
01274696
Vues:
14
You're quite welcome. BTW -- If there is a possiblity of Spanish-language text or names there are a few more characters you may want to include (e.g. chr(209), chr(241)). There may be similar considerations if you may have other European language text or names.

As for my mentioning of Asian-language text, I've run into enough situations where programs run fine in an English-language environment, but crash with strange errors when run in an Asian-language environment. The cause turned out to be string literals containing upper-ASCII characters (stuff in the chr(128)...chr(255) range) that were entered using ALT-nnn key sequence. Some upper-ASCII characters are used as "lead-in" characters that signal double-byte character sequences. Strings ending with any of these "lead-in" characters cause the closing quote to get interpreted as a data byte (effectively "eating" the closing quote), which results in the runtime error. The workaround was to avoid entering string literals using ALT-nnn key sequence (for any character in the range 128-255). You can still get those characters in the string by using the CHR() function. Although you may still get an occasional strange display (because of misinterpretation of string text), you at least avoid getting a runtime error. And if that isn't confusing enough, not only does each Asian language have different encoding schemes, it's not uncommon to run into more than one encoding for some Asian languages.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform