Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Display chr(21)
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00579731
Message ID:
00579830
Vues:
29
This message has been marked as the solution to the initial question of the thread.
>>Hello all,
>>
>>I would like to be able to properly display ASII character 21 (decimal, hex
>>value is 15) in an editBox. This character can be used as a segment
>>terminator in EDI files.
>>
>>You can see what the character is supposed to look like by holding the ALT
>>key down and typing 21 on the key pad. This method works in the command
>>window, in MODIFY command edit window, or in an editBox. At least it does if
>>the font is Courier New.
>>
>>However, the problem is when a string contains this value. I am using
>>filetostr() to get an EDI file, and I would like to be able to display its
>>contents properly in an editBox. This character is rendered as a square. If
>>I display the string to the vfp screen, it is displayed as a thick vertical
>>bar.
>
>Hmm. I just went into Notepad, typed ALT-21, saved that file, and imported it into VFP -- it showed up correctly, and when I did ASC(lcStr), it printed 167. Something's wacky somewhere, and I'm not convinced it's VFP.

No, I don't think so either. I think it's the character mapping of the font being used. For example, if you use Arial, Tahoma, or MS Sans Serif, CHR(167) prints as §. However, if you use FoxFont, it doesn't.
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform