IBM Informix GLS API Programmer's Guide

IBM Informix GLS API Programmer's Guide

Informix Product Family Informix Global Language Support Version 5.00 IBM Informix GLS API Programmer's Guide SC27-3849-01 Informix Product Family Informix Global Language Support Version 5.00 IBM Informix GLS API Programmer's Guide SC27-3849-01 Note Before using this information and the product it supports, read the information in “Notices” on page C-1. This edition replaces SC27-3849-00. This document contains proprietary information of IBM. It is provided under a license agreement and is protected by copyright law. The information contained in this publication does not include any product warranties, and any statements provided in this publication should not be interpreted as such. When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. © Copyright IBM Corporation 1998, 2012. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Introduction .................................vii About this publication ...............................vii Types of users .................................vii Software compatibility ..............................vii Assumptions about your locale............................vii Demonstration databases .............................viii What's new in GLS API, Version 5.00 ..........................viii Character-representation conventions ...........................ix Single-byte characters ...............................ix Multibyte characters ................................x Single-byte and multibyte characters in the same string ....................x White space characters in strings ...........................x Trailing white space characters ............................xi Example code conventions ..............................xi Additional documentation ..............................xii Compliance with industry standards ...........................xii How to provide documentation feedback .........................xii Chapter 1. Using Informix GLS .........................1-1 Internationalized programs with Informix GLS .......................1-1 What is Informix GLS? ..............................1-2 Informix GLS compatibility .............................1-2 Choose a GLS Locale ...............................1-3 Using Informix GLS in a C-language program .......................1-4 Compile and link Informix GLS ...........................1-5 Initialize the Informix GLS library ..........................1-8 Informix GLS exceptions..............................1-8 Allocate memory ................................1-10 Input and output streams .............................1-10 Run the program ................................1-10 Improve program performance ............................1-11 Optimize Informix GLS ..............................1-11 Processing wide characters.............................1-11 Chapter 2. Character processing ........................2-1 Types of characters ................................2-1 Single-byte characters...............................2-1 Multibyte characters ...............................2-2 Character operations ................................2-5 Character classification ..............................2-5 Case conversion ................................2-8 Code-set conversion ...............................2-13 String operations .................................2-18 String traversal ................................2-18 String processing ................................2-19 Character/string comparison and sorting ........................2-20 Other operations .................................2-22 String and character termination...........................2-22 Managing memory for strings and characters ......................2-24 Keep multibyte strings consistent ..........................2-26 Chapter 3. Data formatting ...........................3-1 Locale-specific data formats..............................3-1 The LC_NUMERIC locale-file category .........................3-1 The LC_MONETARY locale-file category ........................3-2 © Copyright IBM Corp. 1998, 2012 iii The LC_TIME locale-file category ...........................3-3 Conversion and formatting with Informix GLS .......................3-3 Convert a locale-specific string............................3-5 Format a locale-specific string ............................3-5 Chapter 4. Informix GLS functions .......................4-1 Function summary.................................4-1 Function reference .................................4-4 The ifx_gl_case_conv_outbuflen() function ........................4-4 The ifx_gl_complen() function ............................4-5 The ifx_gl_conv_needed() function ..........................4-6 The ifx_gl_convert_date() function ..........................4-7 The ifx_gl_convert_datetime() function ........................4-13 The ifx_gl_convert_money() function .........................4-20 The ifx_gl_convert_number() function .........................4-23 The ifx_gl_cv_mconv() function ...........................4-26 The ifx_gl_cv_outbuflen() function ..........................4-29 The ifx_gl_cv_sb2sb_table() function .........................4-30 The ifx_gl_format_date() function ..........................4-31 The ifx_gl_format_datetime() function .........................4-37 The ifx_gl_format_money() function .........................4-43 The ifx_gl_format_number() function .........................4-47 The ifx_gl_getmb() function ............................4-51 The ifx_gl_init() function .............................4-52 The ifx_gl_ismalnum() function ...........................4-54 The ifx_gl_ismalpha() function ...........................4-55 The ifx_gl_ismblank() function ...........................4-57 The ifx_gl_ismcntrl() function............................4-58 The ifx_gl_ismdigit() function............................4-59 The ifx_gl_ismgraph() function ...........................4-61 The ifx_gl_ismlower() function ...........................4-62 The ifx_gl_ismprint() function ...........................4-64 The ifx_gl_ismpunct() function ...........................4-65 The ifx_gl_ismspace() function ...........................4-67 The ifx_gl_ismupper() function ...........................4-68 The ifx_gl_ismxdigit() function ...........................4-70 The ifx_gl_iswalnum() function ...........................4-71 The ifx_gl_iswalpha() function ...........................4-72 The ifx_gl_iswblank() function ...........................4-74 The ifx_gl_iswcntrl() function ............................4-75 The ifx_gl_iswdigit() function............................4-76 The ifx_gl_iswgraph() function ...........................4-77 The ifx_gl_iswlower() function ...........................4-78 The ifx_gl_iswprint() function ...........................4-79 The ifx_gl_iswpunct() function ...........................4-80 The ifx_gl_iswspace() function ...........................4-82 The ifx_gl_iswupper() function ...........................4-83 The ifx_gl_iswxdigit() function ...........................4-84 The ifx_gl_lc_errno() function............................4-85 The ifx_gl_mb_loc_max() function ..........................4-86 The ifx_gl_mblen() function ............................4-87 The ifx_gl_mbscat() function ............................4-88 The ifx_gl_mbschr() function ............................4-89 The ifx_gl_mbscoll() function ............................4-91 The ifx_gl_mbscpy() function ............................4-92 The ifx_gl_mbscspn() function ...........................4-93 The ifx_gl_mbslen() function ............................4-95 The ifx_gl_mbsmbs() function............................4-96 The ifx_gl_mbsncat() function............................4-98 The ifx_gl_mbsncpy() function ...........................4-99 The ifx_gl_mbsnext() function ...........................4-101 iv IBM Informix GLS API Programmer's Guide The ifx_gl_mbsntsbytes() function ..........................4-102 The ifx_gl_mbsntslen() function...........................4-103 The ifx_gl_mbspbrk() function ...........................4-105 The ifx_gl_mbsprev() function ...........................4-106 The ifx_gl_mbsrchr() function ...........................4-107 The ifx_gl_mbsspn() function ...........................4-109 The ifx_gl_mbstowcs() function ...........................4-110 The ifx_gl_mbtowc() function ...........................4-112 The ifx_gl_putmb() function ............................4-113 The ifx_gl_tomlower() function ...........................4-114 The ifx_gl_tomupper() function ...........................4-116 The ifx_gl_towlower() function ...........................4-117 The ifx_gl_towupper() function ...........................4-118 The ifx_gl_wcscat() function ............................4-119 The ifx_gl_wcschr() function............................4-120 The ifx_gl_wcscoll() function ...........................4-121 The ifx_gl_wcscpy() function ...........................4-123 The ifx_gl_wcscspn() function ...........................4-124 The ifx_gl_wcslen() function ............................4-125 The ifx_gl_wcsncat() function ...........................4-126 The ifx_gl_wcsncpy() function ...........................4-128 The ifx_gl_wcsntslen() function ...........................4-129 The ifx_gl_wcspbrk() function ...........................4-130 The ifx_gl_wcsrchr() function ...........................4-131 The ifx_gl_wcsspn() function

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    227 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us