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!

International applications

Status
Not open for further replies.

academica

Technical User
Feb 21, 2010
28
0
0
CN
Everything seems to be going global these days. What about Visual FoxPro? Is it possible to create a table, which holds records in languages from different codepages, say English, Russian, Chinese. A simple example is to create a combobox for the user to choose a language using the native script.

If it's not possible, then how does Office handle international scripts (in Word I can write in all installed keyboard layouts).

How can I build a Unicode application, user interface and database in VFP 9 (I saw that Unicode 5.0 is ready)

VFP 9.0 SP2 on XP SP3
 
Handling different code pages is easy, as is dealing with script fonts. All the support you need is built into VFP. There's plenty of information in the Help file.

However, Unicode is another matter. VFP's native controls cannot display Unicode. You would have to handle that with third-party controls.

You'll probably have no difficulty supporting English and Russian, but you could have a problem with Chinese.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
To answer your specific question about creating a combo box with each language shown in its own script ...

That is possible, but it's a bit of a kludge. Essentially, the native combo box only lets you use a single font or character set for all its items. You can't specify a different font (and therefore a different script) for the different items.

The workaround is to create a popup, using DEFINE POPUP and DEFINE BAR. Use the nFontCharSet parameter to specify a different character set for each bar (that is, for each language - not quite the same as a code page).

Then assign the popup to the combo box by setting the combo's RowSourceType to 9 and the RowSource to the name of the popup.

Alternatively, look for a third-party control that does what you want. I'm sure there are ActiveX combo boxes available that will let you offer a choice of fonts, with each choice rendered in the font in question.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
I would like to thank Mike and craigber for the postings. I found the article on West Wind's website a real gem: it answers all my worries; it's very informative and useful ( and I recommend it if one has to work with multiple code pages simultaneously (i.e. the UTF-8 implementation of Unicode).

VFP 9.0 SP2 on XP SP3
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top