Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get VFP to display special characters

Status
Not open for further replies.

jimstarr

Programmer
Feb 6, 2001
975
0
0
US
I've had a similar problem before when it was language-specific - how to get international characters into FoxPro. I need to create a help screen which contains the following:

---------------------------------------------------
Character codes for important letters that may be missing from your keyboard

To type one of these characters, Press and Hold the Alt key while typing the character’s 3-digit code.

Character = Press/Hold + Number
----------------------------------------------
Ç = Alt + 128
ü = Alt + 129
é = Alt + 130
â = Alt + 131
ä = Alt + 132
à = Alt + 133
å = Alt + 134
ç = Alt + 135
ê = Alt + 136
ë = Alt + 137
è = Alt + 138
ï = Alt + 139
î = Alt + 140
ì = Alt + 141
Ä = Alt + 142
Å = Alt + 143
É = Alt + 144
æ = Alt + 145
Æ = Alt + 146
ô = Alt + 147
ö = Alt + 148
ò = Alt + 149
û = Alt + 150
ù = Alt + 151
ÿ = Alt + 152
Ö = Alt + 153
Ü = Alt + 154
á = Alt + 160
í = Alt + 161
ó = Alt + 162
ú = Alt + 163
ñ = Alt + 164
Ñ = Alt + 165
---------------------------------------------

Some of these special characters don't display correctly in VFP after I copy and paste them into a memo field. Any ideas? Thanks!

Jim
 

Jim,

Can you clarify. Are saying that you want the special characters to appear in your help file? And where are you pasting them from?

If you are pasting directly into a memo field, there is probably a mis-match in the code page. Check the table's codepage via CPDBF(), and see if it's the same as for the VFP session, which you get from CPCURRENT().

If I've misunderstood what you are trying to do, could you please clarify.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Hi Mike,

The help "file" is just one pop-up screen (probably an edit box on a form) showing the information as above. It's in a Word document prepared by my customer that I copied and pasted into my post. I'd like to just paste the same stuff into a memo field, but some of the characters don't transfer correctly.

Jim
 
I don't think so. I'm using Arial and all these characters are available in that font.

Jim
 
I get 2 different characters...

_screen.FontName='Arial'
?CHR(128)
_screen.FontName='FoxFont'
?CHR(128)
 
I do too, but I don't think that that's the essence of the problem.

Try this: copy my original post with all the special characters into Wordpad, Arial font. When I do it, everything looks good. But when I paste the same data into FoxPro (the command window, perhaps) some characters are OK, some not.

Jim
 
When I copy the symbol from Word using Arial ASC('Ç')=199

_screen.FontName='Arial'
?CHR(199)

Brian
 

Not all languages' symbols can be easily used in VFP, but I didn't have problems with those in your original post.

I've just pasted them in Notepad (Lucida Console font), in VFP6 Command window (Courier New font), and in a Memo field of a table (Arial, then MS Sans Serif fonts). Quickly compared with the original - look OK to me.
 
Mike, I'm pasting from a Word document directly into a memo field in a cursor. CPDBF() and CPCURRENT() are both = 1250.

Browsing the memo field I see that some of the characters display differently than the original document even though the fonts are the same.

Jim
 
If you just need them in a help screen (view only) why not use bitmap? Just a suggestion.
So you don't have to bother at all.
 

Jim,

I've been trying to reproduce this problem, but cannot do so. The only time I see different characters showing up is if I set the font for the memo field to something other than a Windows font (e.g. Foxfont).

You say that only some of the characters are failing to appear. Can you give us a list of the characters in question?

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
jim,

I copied and pasted your original post both to a memo field and the VFP command window - and they look exactly the same as your post - am I missing something?





 
Thank you all for your posts!

It's interesting that some of you can simply copy and paste into the command window with perfect results. When I do it about 14 of the 33 special characters are incorrect. For example "Ñ" shows up as "N~", "Æ" becomes "?", etc.

I need to drop this problm for now even though it's not actually solved. We're creating the help screen as a .bmp (thanks, tsh73), a totally acceptable workaround. Thanks again for all the suggestions.

Jim
 

The question is, if you cannot reproduce the special symbols on a Help screen, will your users be able to reproduce them by following the instructions in your .BMP?
 
Thanks, Stella. I already asked this question myself and the users say they have no problem inputting the special characters.

Jim
 
I'm betting Word (or your specific document) is the culprit here.

Have you tried copy/paste from what you've posted here instead of copy/paste from Word?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top