JavaScript Editor js editor     Web development 



Main Page

An important aspect of developing international applications is knowing how to enter data into your application. Data can come into your application in two ways:

The following sections discuss these two methods.

Entering International Characters

You can enter international characters into Visual FoxPro using your keyboard. The exact method you use depends on the language you're working with. In single-byte character environments, you can enter the characters directly, or by pressing a combination of keys on the keyboard. On the other hand, double-byte character set (DBCS) environments often provide an Input Method Editor (IME), which is an application you can use to enter characters.

Entering Characters Using the Keyboard

With an international keyboard you can display international characters by simply pressing the keys dedicated to those characters. If your keyboard doesn't have keys for international characters, you can enter such characters by using the character map provided with Windows (available from the Accessories menu) or by pressing the ALT key in conjunction with keys on the numeric keypad.

For instance, to type (ANSI code 246), press NUM LOCK on the numeric keypad, and then press ALT+0246. Be sure to use a standard Windows font — not FoxFont or FoxPrint.

Tip:
The status bar on the character map shows the key combination that corresponds to each character selected on the map.

Note:
You cannot enter international characters in FoxFont. For example, if you open the Command window, switch to FoxFont, and then press a dedicated key, the result isn't the character on the key. For best results, avoid FoxFont in international applications.

Troubleshooting

If characters don't transport correctly, see if you're using FoxFont. For example, FoxFont is the default for user-defined windows created with the DEFINE WINDOW Command (if the FONT clause is omitted). Be sure to use the FONT clause to specify a font other than the standard Windows font when creating user-defined windows so that international characters display correctly.

Entering Characters Using an IME

If you're working in an IME environment, you can use an Input Method Editor to enter characters into Visual FoxPro. The IME is an application provided with your environment that makes it possible for you to type characters on the keyboard to display a selection of international characters and then choose the specific character you want. For example, an IME for Chinese might make it possible for you to enter a Pinyin representation of a Chinese word and then display a list of characters that match the representation. When you select the character you want, the IME pastes it into Visual FoxPro.

You can control when Visual FoxPro displays an IME by setting the IMEMode Property or calling the IMESTATUS( ) Function. If you turn the IME window on, Visual FoxPro automatically displays the IME when you're editing in a system window such as the Browse or Edit windows. If you turn the IME window off, you can invoke the IME by pressing the appropriate keys on your keyboard.

Appending and Copying International Data

If you're importing or copying data from delimited files using the APPEND FROM Command or COPY TO Command, you can specify what character is being used in the file to separate fields. For example, it's common in many European countries to use a semicolon (;) as a field delimiter, whereas the common delimiters in the United States are comma (,), tab, or space.

To import or copy files and specify a delimiter, add the DELIMITED WITH CHARACTER clause to the APPEND FROM or COPY TO commands:

В Copy Code
COPY TO mytxt.txt DELIMITED WITH _ WITH CHARACTER ";"

See Also



JavaScript Editor js editor     Web development