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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP displaying incorrect charachters

Status
Not open for further replies.

keat63

Technical User
Nov 12, 2010
44
GB
Guys.
I inherited an old VFP application a few years ago.
I'm not entirely sure of the version, but it was running on some old Windows95 computers, so gives some indication to it's age.
I was challenged with getting it to run on XP, which it has been without any issues for at least 4 or 5 years.
I'm now tasked with trying to get it to run on Windows7.
I've had some success, other than some incorrect charachters.
If i type £ symbol, the display gives me a #
Or if i type a @ i get ".

I've checked the keyboard type, language type, regional setting etc and all are correct.
If i open notepad, i get the correct symbols.
If i open a cmd prompt, I get the correct symbols.
But when I start the VFP client app, I get the wrong symbols.

This is the ice breaker as to whether or not i can upgrade all the PC's to W7.

Any thoughts please
 
Does the problem only happen on your own computer, or do you see it on all computers on which the app is running?

Does it also happen in the VFP development environment, or only in the compiled app?

Given that your keyboard has a pound sign, I assume it is configured as a British keyboard. Do you also have a US keyboard layout installed?

I had a similar problem a few years ago, in my the development environment and my application, but it was only happening on one computer. In my case, VFP was confusing the computer's standard US keyboard for a German layout. (In your case, it seems to think your UK keyboard has a US layout.) The computer had keyboard drivers installed for US, UK and German layouts. It also had a control in the system tray that lets the user switch between those layouts.

I solved the problem by disabling the above-mentioned system tray control (which I did from Regional and Language settings in Control Panel). I'm not sure, but I might also have removed the German driver. (Not very satisfactory solutions for the user's point of view, I admit.)

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Mike i'm not sure if our app is VFP, it might be an older verion of FP.
I don't have a development environment as such, as I didn't write it.
At the moment, I only have it installed on two PC's, but then i only have 2 Win7 PC's on site.
The problem does exists on both.
I'm tempted to take it home and try it on my personal PC and see what happens.
I've checked all the keyboard config, and they both only have a UK keyboard installed, both with UK regional settings etc.

Like I say, if i open a cmd prompt, the pound symbol works.
Once i launch FP, it doesn't.
But works ok on XP.

I've emailed the guy who wrote the app, but i'm not sure when i'll get his input.
 
I see that you have posted your same question in both the OLD FP forum area (Old FP on W7 issue with wrong characters displayed
thread182-1722907) and in this one.

Based on what you indicate about the application it is likely to be written in a version of OLD FP.

I am glad that MIke may have some answers that might help you out, but you should not concurrently post in both language-specific places.

Good Luck,
JRB-Bldr
 
That's useful information. The fact that it's OK at the command prompt but not in the application suggests that the app is doing something (deliberately or otherwise) to make this happen. That's different from my case, where it was happening in the development environment as well.

Was the app originally written in FoxPro for DOS? of FoxPro for Windows? In the DOS world, we used to have a command in the Autoexec.Bat file to enable the mapping for a British keyboard. I wonder if that command is still in effect somehow - but hard to see how that's possible. In any case, that wouldn't explain why it was running OK before you migrated to Windows 7.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Sorry chaps.
I realized that I may have posted in the wrong section, hence my apology on the duplicate thread in the old section, and my second post (possibly wrong sectionon this.
I couldn't find a way to delete this one, then Mike replied.

I'm still scouring the net and yes it is an old DOS app, hence me saying i think it might not be VFP, i think i've also confirmed this now, with something i fond talking about config.fp vs config.fpw.

I looked in autoexec.net and config.nt on the XP machine, and nothing appears different.
All the machines are running the same FoxR files when the app launches.

So i may do a little more digging down that keyboard route.
 
Mike

Your idea was spot on.
I added the following line to autoexec.nt rebooted and the symbols are now working.
kb16 UK,850,c:\windows\system32\keyboard.sys

Thanks for the guidance.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top