| Title and Copyright Information |
| About This Manual |
| Audience |
| New and Changed Features |
| New and Changed Features for Tru64 UNIX Version 5.0 |
| New and Changed Features for Tru64 UNIX Version 4.0F |
| New and Changed Features for DIGITAL UNIX Version 4.0 |
| Organization |
| Related Documentation |
| Reader's Comments |
| Conventions |
| 1 | Introduction |
| 1.1 | Language |
| 1.2 | Cultural Data |
| 1.3 | Character Sets |
| 1.4 | Localization |
| 1.4.1 | Collating Sequence |
| 1.4.2 | Character Classification |
| 1.4.3 | Case Conversion |
| 1.4.4 | Language Information |
| 1.4.5 | Message Catalogs |
| 1.5 | Language Announcement |
| 1.6 | Terms and Definitions |
| 1.6.1 | Characters and Strings |
| 1.6.2 | Portable Character Set |
| 1.6.3 | The Universal Character Set |
| 2 | Developing Internationalized Software |
| 2.1 | Using Codesets |
| 2.1.1 | Ensuring Data Transparency |
| 2.1.2 | Using In-Code Literals |
| 2.1.3 | Manipulating Characters That Span Multiple Bytes |
| 2.1.4 | Converting Between Multibyte-Character and Wide-Character Data |
| 2.1.5 | Rules for Multibyte Characters in Source and Execution Codesets |
| 2.1.6 | Classifying Characters |
| 2.1.7 | Converting Characters |
| 2.1.8 | Comparing Strings |
| 2.2 | Handling Cultural Data |
| 2.2.1 | The langinfo Database |
| 2.2.2 | Querying the langinfo Database |
| 2.2.3 | Generating and Interpreting Date and Time Strings That Observe Local Customs |
| 2.2.4 | Formatting Monetary Values |
| 2.2.5 | Formatting Numeric Values in Program-Specific Ways |
| 2.2.6 | Using the langinfo Database for Other Tasks |
| 2.3 | Handling Text Presentation and Input |
| 2.3.1 | Creating and Using Messages |
| 2.3.2 | Formatting Output Text |
| 2.3.3 | Scanning Input Text |
| 2.4 | Binding a Locale to the Run-Time Environment |
| 2.4.1 | Binding to the Locale Set for the System or User |
| 2.4.2 | Changing Locales During Program Execution |
| 3 | Creating and Using Message Catalogs |
| 3.1 | Creating Message Text Source Files |
| 3.1.1 | General Rules |
| 3.1.2 | Message Sets |
| 3.1.3 | Message Entries |
| 3.1.4 | Quote Directive |
| 3.1.5 | Comment Lines |
| 3.1.6 | Style Guidelines for Messages |
| 3.2 | Extracting Message Text from Existing Programs |
| 3.3 | Editing and Translating Message Source Files |
| 3.4 | Generating Message Catalogs |
| 3.4.1 | Using the mkcatdefs Command |
| 3.4.2 | Using the gencat Command |
| 3.4.3 | Design and Maintenance Considerations for Message Catalogs |
| 3.5 | Displaying Messages and Locale Data Interactively or from Scripts |
| 3.6 | Accessing Message Catalogs in Programs |
| 3.6.1 | Opening Message Catalogs |
| 3.6.2 | Closing Message Catalogs |
| 3.6.3 | Reading Program Messages |
| 4 | Handling Wide-Character Data with curses Routines |
| 4.1 | Writing a Wide Character to a curses Window |
| 4.1.1 | Add Wide Character (Overwrite) and Advance Cursor |
| 4.1.2 | Insert Wide Character (no Overwrite) and Do Not Advance Cursor |
| 4.2 | Writing a Wide-Character String to a curses Window |
| 4.2.1 | Add Wide-Character String (Overwrite) and Do Not Advance Cursor |
| 4.2.2 | Add Wide-Character String (Overwrite) and Advance Cursor |
| 4.2.3 | Insert Wide-Character String (no Overwrite) and Do Not Advance Cursor |
| 4.3 | Removing a Wide Character from a curses Window |
| 4.4 | Reading a Wide Character from a curses Window |
| 4.5 | Reading a Wide-Character String from a curses Window |
| 4.5.1 | Reading Wide-Character Strings with Attributes |
| 4.5.2 | Reading Wide-Character Strings Without Attributes |
| 4.6 | Reading a String of Characters from a Terminal |
| 4.7 | Reading or Queuing a Wide Character from the Keyboard |
| 4.8 | Converting Formatted Text in a curses Window |
| 4.9 | Printing Formatted Text on a curses Window |
| 5 | Creating Internationalized X, Xt, and Motif Applications |
| 5.1 | Using Internationalization Features in the X Toolkit Intrinsics |
| 5.1.1 | Establishing a Locale with Xt Functions |
| 5.1.2 | Using Font Set Resources with Xt Functions |
| 5.1.3 | Filtering Events During Text Input with Xt Functions |
| 5.1.4 | Including the Codeset Component of Locales with Xt Functions |
| 5.2 | Using Internationalization Features of the OSF/Motif and DECwindows Motif Toolkits |
| 5.2.1 | Setting Language in a Motif Application |
| 5.2.2 | Using Compound Strings and the XmText, XmTextField, and DXmCSText Widgets |
| 5.2.3 | Internationalization Features of Widget Classes |
| 5.3 | Using Internationalization Features in the X Library |
| 5.3.1 | Using the X Library to Manage Locales |
| 5.3.2 | Displaying Text for Different Locales |
| 5.3.2.1 | Creating and Manipulating Font Sets |
| 5.3.2.2 | Obtaining Metrics for Font Sets |
| 5.3.2.3 | Drawing Text with Font Sets |
| 5.3.2.4 | Handling Text with the X Output Method |
| 5.3.2.5 | Converting Between Different Font Set Encodings |
| 5.3.3 | Handling Interclient Communication |
| 5.3.4 | Handling Localized Resource Databases |
| 5.3.5 | Handling Text Input with the X Input Method |
| 5.3.5.1 | Opening and Closing an Input Method |
| 5.3.5.2 | Querying Input Method Values |
| 5.3.5.3 | Creating and Using Contexts for an Input Method |
| 5.3.5.4 | Providing Preediting Callbacks for the On-the-Spot Input Style |
| 5.3.5.5 | Filtering Events for an Input Method |
| 5.3.5.6 | Obtaining Composed Strings from the Keyboard |
| 5.3.5.7 | Handling Failure of the Input Method Server |
| 5.3.6 | Using X Library Features: A Summary |
| 6 | Using Internationalized Software |
| 6.1 | Working in a Multilanguage Environment: Introduction |
| 6.2 | Setting Locale and Language |
| 6.3 | Selecting Keyboard Type |
| 6.3.1 | Determining Keyboard Layout |
| 6.4 | Determining Input Method |
| 6.5 | Determining the Input Mode Switch State |
| 6.6 | Defining the Search Path for Specialized Components |
| 6.7 | Using Terminal Interface Features for Asian Languages |
| 6.7.1 | Converting Between Application and Terminal Codesets |
| 6.7.2 | Command Line Editing That Supports Multibyte Characters |
| 6.7.3 | Kana-Kanji Conversion: Customization of Japanese Input Options |
| 6.8 | Supporting User-Defined Characters and Phrase Input |
| 6.9 | Using Printer Interface Features That Support Local Languages |
| 6.9.1 | Generic Internationalized Print Filters |
| 6.9.1.1 | pcfof Print Filter |
| 6.9.1.2 | wwpsof Print Filter |
| 6.9.2 | Print Filters for Specific Local Language Printers |
| 6.9.3 | Support for Local Language Printers in /etc/printcap |
| 6.9.4 | Enhancements to Printer Configuration Software |
| 6.9.5 | Print Commands and the Printer Daemon |
| 6.9.6 | Choosing PostScript Fonts for Different Locales |
| 6.10 | Using Mail in a Multilanguage Environment |
| 6.10.1 | The sendmail Utility |
| 6.10.2 | The mailx Command and MH Commands |
| 6.10.3 | The comsat Server |
| 6.11 | Applying Sort Orders to Non-English Characters |
| 6.12 | Processing Reference Pages in Languages Other Than English |
| 6.12.1 | The nroff Command |
| 6.12.2 | The tbl Command |
| 6.12.3 | The man Command |
| 6.13 | Converting Data Files from One Codeset to Another |
| 6.14 | Miscellaneous Information for Base System Commands |
| 6.15 | Using Language Support Enhancements for Motif Applications |
| 6.15.1 | Tuning the X Server for Ideographic Languages |
| 6.15.2 | Using Font Renderers for Multibyte PostScript Fonts |
| 6.15.2.1 | Setting Up the Font Renderer for Double-Byte PostScript Fonts |
| 6.15.2.2 | Setting Up the Font Renderer for UDC Fonts |
| 6.15.3 | Setting Fonts for Display of Local Languages |
| 6.15.3.1 | Accessing Local-Language Fonts for Remote Displays |
| 6.15.4 | Customizing a Terminal Emulation Window for Asian Languages |
| 7 | Creating Locales |
| 7.1 | Creating a Character Map Source File for a Locale |
| 7.2 | Creating Locale Definition Source Files |
| 7.2.1 | Defining the LC_CTYPE Locale Category |
| 7.2.2 | Defining the LC_COLLATE Locale Category |
| 7.2.3 | Defining the LC_MESSAGES Locale Category |
| 7.2.4 | Defining the LC_MONETARY Locale Category |
| 7.2.5 | Defining the LC_NUMERIC Locale Category |
| 7.2.6 | Defining the LC_TIME Locale Category |
| 7.3 | Building Libraries to Convert Multibyte/Wide-Character Encodings |
| 7.3.1 | Required Methods |
| 7.3.1.1 | Writing the _ _mbstopcs Method for the fgetws Function |
| 7.3.1.2 | Writing the _ _mbtopc Method for the getwc( ) Function |
| 7.3.1.3 | Writing the _ _pcstombs Method for the fputws( ) Function |
| 7.3.1.4 | Writing a _ _pctomb Method |
| 7.3.1.5 | Writing a Method for the mblen( ) Function |
| 7.3.1.6 | Writing a Method for the mbstowcs( ) Function |
| 7.3.1.7 | Writing a Method for the mbtowc( ) Function |
| 7.3.1.8 | Writing a Method for the wcstombs( ) Function |
| 7.3.1.9 | Writing a Method for the wctomb( ) Function |
| 7.3.1.10 | Writing a Method for the wcswidth( ) Function |
| 7.3.1.11 | Writing a Method for the wcwidth( ) Function |
| 7.3.2 | Optional Methods |
| 7.3.3 | Building a Shareable Library to Use with a Locale |
| 7.3.4 | Creating a methods File for a Locale |
| 7.4 | Building and Testing the Locale |
| A | Summary Tables of Worldwide Portability Interfaces |
| A.1 | Locale Announcement |
| A.2 | Character Classification |
| A.3 | Case and Generic Property Conversion |
| A.4 | Character Collation |
| A.5 | Access to Data That Varies According to Language and Custom |
| A.6 | Conversion and Format of Date/Time Values |
| A.7 | Printing and Scanning Text |
| A.8 | Number Conversion |
| A.9 | Conversion of Multibyte and Wide-Character Values |
| A.10 | Input and Output |
| A.11 | String Handling |
| A.12 | Codeset Conversion |
| B | Setting Up and Using User-Defined Character Databases |
| B.1 | Creating User-Defined Characters |
| B.1.1 | Working on the cedit User Interface Screen |
| B.1.2 | Editing Font Glyphs |
| B.2 | Creating UDC Support Files That System Software Uses |
| B.3 | Processing UDC Fonts for Use with X11 or Motif Applications |
| B.3.1 | Using fontconverter Command Options |
| B.3.2 | Controlling Output File Format |
| C | Setting Up and Using the Chinese Phrase Input Method |
| C.1 | Enabling the SIM Service |
| C.2 | Creating and Maintaining a Chinese Phrase Database |
| C.3 | Using a Chinese Phrase Database |
| C.3.1 | Phrase Input Supported Through the SIM Service |
| C.3.2 | Phrase Input from the Input Options Application |
| D | Using DECterm Localization Features in Programs |
| D.1 | Drawing Ruled Lines in a DECterm Window |
| D.1.1 | Drawing Ruled Lines in a Pattern |
| D.1.2 | Erasing Ruled Lines in a Pattern |
| D.1.3 | Erasing All Ruled Lines in an Area |
| D.1.4 | Interaction of Ruled Lines and Other DECterm Escape Sequences |
| D.1.5 | Determining if the DECterm Device Setting Supports Ruled Lines |
| D.2 | DECterm Programming Restrictions |
| D.2.1 | Downline Loadable Characters |
| D.2.2 | DRCS Characters |
| E | Sample Locale Source Files |
| E.1 | Character Map (charmap) Source File |
| E.2 | Locale Definition Source File |
| Glossary |
| Examples |
| 3-1 | Message Text Source File |
| 3-2 | Generating a Message Catalog Interactively |
| 5-1 | Setting Locale in an X Windows Application |
| 5-2 | Creating and Using Font Sets in an X Windows Application |
| 5-3 | Drawing Text in an X Windows Application |
| 5-4 | Communicating with Other Clients in an X Windows Application |
| 5-5 | Opening and Closing an Input Method in an X Windows Application |
| 5-6 | Obtaining the User Interaction Styles for an Input Method |
| 5-7 | Creating and Destroying an Input Method Context in an X Windows Application |
| 5-8 | Using Preediting Callbacks in an X Windows Application |
| 5-9 | Filtering Events for an Input Method in an X Windows Application |
| 5-10 | Obtaining Keyboard Input in an X Windows Application |
| 5-11 | Handling Failure of the Input Method Server |
| 6-1 | Default cp_dirs File |
| 6-2 | Setting Up a Local Language Printer with lprsetup |
| 7-1 | The charmap File for a Sample Locale |
| 7-2 | Fragment from a charmap File for a Multibyte Codeset |
| 7-3 | Structure of Locale Source Definition File |
| 7-4 | LC_CTYPE Category Definition |
| 7-5 | LC_COLLATE Category Definition |
| 7-6 | LC_MESSAGES Category Definition |
| 7-7 | LC_MONETARY Category Definition |
| 7-8 | LC_NUMERIC Category Definition |
| 7-9 | LC_TIME Category Definition |
| 7-10 | The _ _mbstopcs_sdeckanji Method for the ja_JP.sdeckanji Locale |
| 7-11 | The _ _mbtopc_sdeckanji Method for the ja_JP.sdeckanji Locale |
| 7-12 | The _ _pcstombs_sdeckanji Method for the ja_JP.sdeckanji Locale |
| 7-13 | The _ _pctomb_sdeckanji Method for the ja_JP.sdeckanji Locale |
| 7-14 | The _ _mblen_sdeckanji Method for the ja_JP.sdeckanji Locale |
| 7-15 | The _ _mbstowcs_sdeckanji Method for the ja_JP.sdeckanji Locale |
| 7-16 | The _ _mbtowc_sdeckanji Method for the ja_JP.sdeckanji Locale |
| 7-17 | The _ _wcstombs_sdeckanji Method for the ja_JP.sdeckanji Locale |
| 7-18 | The _ _wctomb_sdeckanji Method for the ja_JP.sdeckanji Locale |
| 7-19 | The _ _wcswidth_sdeckanji Method for the ja_JP.sdeckanji Locale |
| 7-20 | The _ _wcwidth_sdeckanji Method for the ja_JP.sdeckanji Locale |
| 7-21 | Building a Library of Methods Used with the ja_JP.sdeckanji Locale |
| 7-22 | The methods File for the ja_JP.sdeckanji Locale |
| 7-23 | Building the fr_FR.ISO8859-1@example Locale |
| 7-24 | Setting the LOCPATH Variable and Testing a Locale |
| Figures |
| 3-1 | Converting an Existing Program to Use a Message Catalog |
| B-1 | Components That Support User-Defined Characters |
| B-2 | The cedit User Interface Screen |
| B-3 | The cedit Font Editing Screen |
| B-4 | Interpretation of Font Editing Screen for Sizing a Font |
| B-5 | Keymap for cedit Functions |
| C-1 | User Interface Screen of the phrase Utility |
| D-1 | Drawing Ruled Lines with the DECDRLBR Sequence |
| D-2 | Bit Pattern for DECDRLBR Parameters |
| Tables |
| 3-1 | Coding of Special Characters in Message Text Source Files |
| 5-1 | Locale Announcement Functions in the X Library |
| 5-2 | X Library Functions That Create and Manipulate Font Sets |
| 5-3 | X Library Functions That Measure Text |
| 5-4 | X Library Functions That Draw Text |
| 5-5 | X Library Functions for Output Method and Context |
| 5-6 | X Library Functions for Interclient Communication |
| 5-7 | X Library Functions That Handle Localized Resource Databases |
| 5-8 | X Library Functions That Manage Input Context (XIC) |
| 6-1 | The stty Command Options for Controlling Terminal Line Discipline |
| 6-2 | The stty Options to Explicitly Set Application and Terminal Code |
| 6-3 | The stty Options to Enable/Disable History Mode |
| 6-4 | Command Line Editing in History Mode |
| 6-5 | The stty Options to Enable and Customize Japanese Input |
| 6-6 | Symbols in /etc/printcap File for Local Language Printers |
| 6-7 | Local Language Printers Supported by the lprsetup Command |
| 6-8 | Supported Codeset Conversions for English |
| 6-9 | X Server Options for Tuning the Font-Cache Mechanism |
| 6-10 | XLFD Registry Names for UDC Characters |
| 6-11 | Bitmap Fonts for Asian Locales |
| 6-12 | Bitmap Fonts for *.ISO8859-2 Locales |
| 6-13 | Bitmap Fonts for *.ISO8859-4 Locales |
| 6-14 | Bitmap Fonts for *.ISO8859-5 Locales |
| 6-15 | Bitmap Fonts for *.ISO8859-7 Locales |
| 6-16 | Bitmap Fonts for *.ISO8859-8 Locales |
| 6-17 | Bitmap Fonts for *.ISO8859-9 Locales |
| B-1 | The stty Options for On-Demand Loading of UDC Support Files |
| B-2 | The cedit Command Options |
| B-3 | Keys for Miscellaneous Font Editing Functions |
| B-4 | Keys for cedit Mode Switching |
| B-5 | Keys for Fine Control of Cursor Movement |
| B-6 | Keys for Moving Cursor to Window Areas |
| B-7 | Keys for Drawing Font Glyphs |
| B-8 | Keys for Editing Font Glyphs |
| B-9 | The cgen Command Options |
| B-10 | Options and Arguments of the fontconverter Command |
| C-1 | Chinese Phrase Input Definitions |
| C-2 | The stty Options Used for the SIM Service |
| C-3 | The phrase Options for the VT382-D Terminal |
| D-1 | Behavior of Standard Escape Sequences with Ruled Lines |
| Index |