Universe NLS User Guide
Total Page:16
File Type:pdf, Size:1020Kb
Rocket UniVerse NLS Guide Version 11.2.5 July 2015 UNV-1125-NLS-1 Notices Edition Publication date: July 2015 Book number: UNV-1125-NLS-1 Product version: Rocket UniVerse V11.2.5 Copyright © Rocket Software, Inc. or its affiliates 1985-2015. All Rights Reserved. Trademarks Rocket is a registered trademark of Rocket Software, Inc. For a list of Rocket registered trademarks go to: www.rocketsoftware.com/about/legal. All other products or services mentioned in this document may be covered by the trademarks, service marks, or product names of their respective owners. Examples This information might contain examples of data and reports. The examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. License agreement This software and the associated documentation are proprietary and confidential to Rocket Software, Inc. or its affiliates, are furnished under license, and may be used and copied only in accordance with the terms of such license. Note: This product may contain encryption technology. Many countries prohibit or restrict the use, import, or export of encryption technologies, and current use, import, and export regulations should be followed when exporting this product. 2 Corporate information Rocket Software, Inc. develops enterprise infrastructure products in four key areas: storage, networks, and compliance; database servers and tools; business information and analytics; and application development, integration, and modernization. Website: www.rocketsoftware.com Rocket Global Headquarters 77 4th Avenue, Suite 100 Waltham, MA 02451-1468 USA To contact Rocket Software by telephone for any reason, including obtaining pre-sales information and technical support, use one of the following telephone numbers. Country Toll-free telephone number United States 1-855-577-4323 Australia 1-800-823-405 Belgium 0800-266-65 Canada 1-855-577-4323 China 800-720-1170 France 0800-180-0882 Germany 08-05-08-05-62 Italy 800-878-295 Japan 0800-170-5464 Netherlands 0-800-022-2961 New Zealand 0800-003210 South Africa 0-800-980-818 United Kingdom 0800-520-0439 Contacting technical support The Rocket Customer Portal is the primary method of obtaining support. If you have current support and maintenance agreements with Rocket Software, you can access the Rocket Customer Portal and report a problem, download an update, or find answers in the U2 Knowledgebase. To log into the Rocket Customer Portal or to request a Rocket Customer Portal account, go to www.rocketsoftware.com/support. In addition to using the Rocket Customer Portal to obtain support, you can send email to [email protected] or use one of the following telephone numbers. Country Toll-free telephone number North America +1 800 729 3553 United Kingdom/France +44(0) 800 773 771 or +44(0) 20 8867 3691 Europe/Africa +44 (0) 20 88673692 Australia +1 800 707 703 or +61 (0) 29412 5450 New Zealand +0800 505 515 3 Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Beta Table of Contents Table of Contents Chapter 1 Chapter 1: What is NLS? NLS mode . 1-3 How NLS mode works. 1-4 Internal character set. 1-4 Mapping . 1-5 Enabling NLS mode . 1-5 What you get with NLS . 1-6 Maps . 1-6 Locales . 1-6 Chapter 2 Chapter 2: Getting started Installing NLS. 2-3 Removing NLS . 2-4 NLS shared memory segments on UNIX systems . 2-4 Making a plan. 2-5 Setting configurable parameters . 2-6 Editing the uvconfig file . 2-8 Setting default maps and locales . 2-10 Setting locales . 2-13 Associating maps with devices . 2-14 Mapping in the spool queue . 2-15 Setting file maps. 2-16 Setting terminal maps. 2-17 Retrieving terminal settings . 2-18 Setting maps tapes and other devices. 2-19 Updating accounts . 2-20 Configuring NLS for client programs. 2-21 Maps for client programs . 2-21 Locales for client programs . 2-23 Configuration checklist . 2-25 C:\U2Doc\UniVerse\11.2\Source\nls\NLSTOC.fm (bookTOC.template) June 16, 2015 3:01 pm Chapter 3 Chapter 3: Maps How maps work. 3-3 Main maps and input maps . 3-3 Base maps . 3-4 Creating a map description. 3-8 Example of a map description record . 3-10 Creating a map table . 3-10 Example of a map table record . 3-12 Multibyte NLS maps and system delimiters . 3-14 Handling extra characters . 3-16 Defining new characters. 3-16 Maps and files . 3-17 Assigning maps to new files . 3-17 Modifying file maps . 3-17 Chapter 4 Chapter 4: Locales How locales work . 4-3 Creating conventions . 4-6 Creating new locales . 4-7 Naming locales . 4-7 Format of convention records . 4-8 Time records . 4-8 Numeric records . 4-14 Monetary records . 4-16 Ctype records . 4-21 Collate records . 4-24 Collating. 4-28 How UniVerse collates . 4-29 Example of accented collation . 4-30 Example of cased collation . 4-30 Shared weights and blocks . 4-31 Contractions and expansions . 4-31 Editing weight tables . 4-31 Calculating the overall weight. 4-33 Using locales . 4-35 Retrieving locale settings . 4-35 Saving and restoring locales . 4-35 Listing current locales . 4-36 Changing current locales . 4-36 Table of Contents 5 Chapter 5 Chapter 5: NLS in UniVerse BASIC programs How UniVerse BASIC is affected . 5-4 Using the UVNLS.H Include file . 5-4 String length . 5-5 Length of record IDs . 5-6 Display length in BASIC . 5-7 Finding the display length of a string . 5-7 Formatting a string in display positions . 5-8 Folding strings using display positions . 5-8 Inputting using display length with INPUTDP . 5-8 Block size always in bytes. 5-8 The REMOVE pointer and multibyte character sets . 5-9 Maps in UniVerse BASIC . 5-10 Determining a file’s map name . 5-10 Maps for source files . 5-11 Maps and devices . 5-12 Maps for auxiliary devices . 5-12 @ Function codes for terminal and auxiliary maps. 5-12 Printing previously mapped data with UPRINT . 5-13 Finding the map associated with a print channel . 5-13 Maps for UNIX pipes. 5-13 Unmappable characters . 5-15 Unmappable characters and WRITE statements . 5-15 Unmappable characters and READ statements . 5-16 Multinational characters in UniVerse BASIC . 5-18 Editing multinational characters . 5-18 Generating characters in external format . 5-20 Generating characters in internal format. 5-21 Internal and external string conversion . 5-21 Displaying records by character value . 5-24 Exchanging character values . 5-25 Case inversion and deadkey characters . 5-26 BASIC and locales . 5-27 Retrieving locale settings . 5-27 Saving and restoring locales . 5-27 Changing the current locale . 5-27 Chapter 6 Chapter 6: NLS in client programs Client programs. 6-4 Maps . 6-4 6 UniVerse NLS Guide Locales. 6-5 System delimiters and the null value . 6-5 UniObjects . 6-6 UniObjects for Java and UniObjects for .NET . 6-7 InterCall functions . 6-8 UCI programs . 6-9 Connecting to the server. 6-9 Requesting an SQLConnect . 6-9 Setting the map and locale . 6-10 Values in the UCI configuration file . 6-10 Interpreting the map name. 6-11 Interpreting the locale name . 6-11 Using SQLGetInfo . 6-11 BCI programs . 6-12 Connecting to the server. 6-12 Requesting an SQLConnect . 6-12 Setting the locale . 6-13 Interpreting the locale name . 6-14 Using SQLGetInfo . 6-14 GCI subroutines . 6-15 Specifying maps for GCI subroutines . 6-15 Data types for multibyte characters . 6-16 Chapter 7 Chapter 7: NLS administration menus Unicode menu. 7-3 Appendix A Appendix A: The NLS Database Appendix B Appendix B: National convention hooks General hook mechanism . B-2 Support from UniVerse. B-5 Memory management . B-6 Using hooks in UniVerse . B-7 Create a GCI definition for the initialization routine . B-7 Compile the hook library . B-8 Build the hook library . B-8 Test the hooks . B-9 Install the hook library . B-9 NLS hook interface definitions . B-10 Hook functions . B-11 Table of Contents 7 Appendix C Appendix C: NLS quick reference UniVerse commands . C-2 UniVerse BASIC statements and functions . C-4 Map tables . C-6 UniVerse locales. C-8 Unicode blocks . C-10 Glossary 8 UniVerse NLS Guide 1Administering UniData on Windows NT or Windows 2000 0 Chapter Chapter 1: What is NLS? 1 NLS mode . 1-3 How NLS mode works. 1-4 Internal character set . 1-4 Mapping . 1-5 Enabling NLS mode. 1-5 What you get with NLS. 1-6 Maps. 1-6 Locales. 1-6 C:\U2Doc\UniVerse\11.2\Source\nls\Ch1TOC.fm March 25, 2014 8:39 am Administering UniData on Windows NT or Windows 2000 C:\U2Doc\UniVerse\11.2\Source\nls\ Ch1 This chapter gives an overview of what NLS (National Language Support) is, why you need it, how it works, and what you will find when you install NLS. Note: This manual uses some terms that may be new to you. When a new term is introduced, it is printed in italic. This means you can find an entry for the term in the Glossary. 1-2 C:\U2Doc\UniVerse\11.2\Source\nls\Ch1 6/16/15 NLS mode UniVerse has a special mode that offers National Language Support (NLS). With NLS mode enabled, you can use UniVerse in various languages and countries. You can do the following: Input data in many character sets (dependent on your local keyboard) Retrieve data and format it using your own conventions or those of another country Output data to a screen or printer using the character sets and display conventions of different countries Write programs that run in different languages and countries without source changes or recompilation 1-3 UniVerse NLS Guide C:\U2Doc\UniVerse\11.2\Source\nls\ Ch1 How NLS mode works NLS mode works by using two types of character set: The NLS internal character set External character sets that cover the world’s different languages In NLS mode, UniVerse maps between the two character sets when you input.