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
 
Hi Mike,

I tried your suggestion and found that I got the same result as with copy/paste - some characters don't display correctly. This also happens when entering data into the text boxes of the application in question, though apparently only on my machine. So there seems to be a glitch in my particular installation......

This is VFP 9, Windows XP.

Jim
 

Jim,

I've now tried all the obvious possibilities: entering Alt+Number keys, copy and paste from Word, copy and paste from this thread, placing the characters in VFP's native memo window, and in ordinary text boxes and edit boxes in a form.

Everything works properly (in VFP 9 in XP). It must be something peculiar in your configuration, but I can't imagine what it is.

It's especially puzzling that you're finding that most of the characters are OK -- just a few that don't work.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Hi Jimstarr,
I agree with MikeLewis that it is probably something to do with your configuration. However I think it is your Windows configuration.
You posted that "Æ" becomes "?"; "Æ" is a unicode character and when ? is printed in VFP it means that VFP didn’t know how to convert this character into something that can be represented in the current code page.
We had a lot of problems with such code when trying to produce a Chinese version of our product in VFP 8. On searching the internet I found this article by Rick Strahl:
It was hard for us to follow, but in the end we found the Chinese character and stored it in a binary field (with nocptrans set) in a table. Then when we wanted to display it we did a chr(asc(Symbol)) and this fixed our problem.

However if this is only hapenning to your machine and no one elses then maybe they have a different code page set on their machines or more language sets installed.


Goodluck,
Shardlow.
 
Hi Shardlow,

"Æ" is a unicode character

Are you sure about that? According to the Character Map applet, it is a standard 8-bit character, with a value of C6.

There is a Unicode character (01FC) that, at first glance, looks the same, but is in fact Æ with an acute accent.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top