Details:
The text strings used in PcVue fall into three catagories.
- Identifier. A configuration object’s identity (name). Variable name, Archive Unit name etc. Identifiers are (in general) restricted to the characters A-Z, a-z, 0-9 and the underscore.
- Description. No restriction on the characters that can be used. Includes the following.
- A configuration object’s Description property. The most useful of these is a variable’s description which is often displayed in the Viewers and the Text-Label animation.
- Associated label strings. Displayed in the Viewers and the Text-Label animation.
- Text Graphic Objects. No restriction on the characters that can be used. This includes most graphic objects in PcVue where you can configure the font. Primarily the Text drawing element and the Viewers but not the Form Controls.
How are text strings stored?
- Identifier. Each character is stored using ASCII encoding in a single byte.
- Descriptor. Each character is stored using SBSC (single byte character set) encoding. Each character is a single byte. The first 128 characters are defined by the ASCII standard. The remaining 128 characters depend on the code page (see below) and are used for other international characters.
- Text Graphic Objects. Each character can be stored either using SBSC or DBSC encoding. How a character is stored is transparent to the user and depends on how it is input. Using DBCS (double byte character set) each character is stored as two bytes. The first byte is a pointer to the code page which contains the required character. The second byte is the reference to that character. Typically used for languages such as Chinese which require more characters than can be catered for in a single byte.
What is a code page?
A code page translates the 256 possible values of a byte into the characters that can be rendered on the screen. The first 128 values are defined by the ASCII standard and are those required for upper and lowercase English, punctuation, base 10 numbers and very little else. The remaining 128 are for other international characters and depend on the code page that is selected.
How do you select a code page?
The code page can be selected wherever the configuration dialog includes a Font Picker. The code page is selected using the Script drop down list box.
The code pages that are available depend on the selected font. The following are the most common.
- Arabic
- Baltic
- Central European
- Cyrillic
- Greek
- Hebrew
- Turkish
- Vietnamese
- Western (default)
How to enter SBCS characters that are not available from the keyboard
There are a number of methods that can be used. In any case the correct code page must be selected for the target text field.
- Use the character picker mimic, as included in KB795, to generate the strings and using Ctrl C to copy them to the clipboard. They can then be pasted into the text field. Works for all characters.
- Use the keyboard by holding down the Alt key and entering the numeric code (decimal) of the character from the keypad. This works OK for accented characters but not for some others.
- Use the Windows Character Map.
In that case you also have to change the Windows System Locale to the correct language.
How to enter DBCS characters
The following instructions are to enter Chinese (simplified) characters.
- First you must configure Windows using the Control Panel, Clock, Language and Region settings.
- Change the setting Language for non-Unicode programs to Chinese (simplified) using the Locale button in the Administrative tab of Region and Language dialog.
Windows will request a reboot at this stage.
- Add a Chinese (simplified) keyboard and IME (input method editor) – for example Chinese (simplified) Microsoft Pinyin ABC style. This allows Chinese characters to be selected phonetically from a western keyboard.
- Entering the characters.
- Using the Windows Language Toolbar, select the input language as Simplified Chinese and select an IME.
- Select the Text drawing tool and left-click in the mimic where the text is to start.
- Enter the characters representing the first character – for example “wo”. A prompt line interface will pop up offering a number of choices. Select the desired character by typing its reference number.
- Repeat step c. for all the characters as you want to generate.
- Confirm the completed string by hitting return. The IME will close and the characters will appear in the text string.
Important FAQ’s
- Windows input language selection only applies to the application that has focus.
- Changing the PcVue project’s Project Language property has no effect on which code page is used.
- Mimics saved in ASCII format are unable to display some of the characters between 128 to 160. (80 and A0). Either alternative characters are displayed or, for any of the quotation mark characters, the mimic will generate an error.
- When configuring new text in PcVue and using a configuration object that allows font selection, the default code page is taken from the Windows Locale setting.
|