OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Call Interface

V2.1.0Enterprise Edition

  • What's New
  • Product Introduction
  • Install OBCI
  • Data types
  • Basic development procedure
  • Development example
  • Load balancing
  • Reference Functions
    • Connect, authorize, and initialize functions
    • Handle and descriptor functions
    • Bind, define, and describe functions
    • Statement functions
    • LOB functions
    • Transaction functions
    • Miscellaneous functions
    • String functions
    • Date and Datetime functions
    • Interval functions
    • Number functions
    • Terminate functions
    • Describe functions
    • Locale functions
    • Define functions
  • Full-link Diagnostic Trace
    • Full-link Diagnostic Trace
    • Full-link Diagnostic Trace of OBCI
    • Sample code

Download PDF

What's New Product Introduction Install OBCI Data types Basic development procedure Development example Load balancing Connect, authorize, and initialize functions Handle and descriptor functions Bind, define, and describe functions Statement functions LOB functions Transaction functions Miscellaneous functions String functions Date and Datetime functions Interval functions Number functions Terminate functions Describe functions Locale functions Define functions Full-link Diagnostic Trace Full-link Diagnostic Trace of OBCI Sample code
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogLive DemosTraining & Certification
Company
About OceanBaseTrust CenterLegalPartnerContact Us
Follow Us

© OceanBase 2026. All rights reserved

Cloud Service AgreementPrivacy PolicySecurity
Contact Us
Document Feedback
  1. Documentation Center
  2. OceanBase Call Interface
  3. V2.1.0
iconOceanBase Call Interface
V 2.1.0Enterprise Edition

Locale functions

Last Updated:2024-05-14 09:02:08  Updated
share
What is on this page
OCINlsEnvironmentVariableGet
OCINlsGetInfo
Parameter values

folded

share

OCINlsEnvironmentVariableGet

Purpose : You can call this function to return the character set ID from NLS_LANG or the ID of the national character set from NLS_NCHAR.

Note

The OBServer supports only the following character sets: UTF-8, GBK, GB18030, and UTF-16.

Syntax :

sword OCINlsEnvironmentVariableGet ( void       *val,
size_t     size,
ub2        item,
ub2        charset, 
size_t     *rsize );

Parameters :

Parameter Description
val (IN/OUT) Returns the value of a National Language Support (NLS) environment variable, such as the NLS_LANG character set ID or the NLS_NCHAR character set ID.
size (IN) The size of the given output value. The parameter is applicable only to string data. The maximum length of each piece of information is OCI_NLS_MAXBUFSZ bytes. For numeric data, this parameter is ignored.
item (IN) Obtains one of the following specified values from the NLS environment variable:
  • OCI_NLS_CHARSET_ID: the NLS_LANG character set ID in the ub2 data type.
  • OCI_NLS_NCHARSET_ID: the NLS_NCHAR character set ID in the ub2 data type.
charset (IN) The character set ID of the retrieved string data. If the value is 0, the NLS_LANG value is used. OCI_UTF16ID is a valid value for this parameter. For numeric data, this parameter is ignored.
rsize (OUT) The length of the return value (in bytes).

Return value : OCI_SUCCESS is returned if the function call succeeded. Otherwise, OCI_ERROR is returned.

OCINlsGetInfo

Purpose : You can call this function to obtain the locale information specified in the Oracle Cloud Infrastructure (OCI) environment or in the handle, and to save the information, within the specified size, into your destination buffer.

Syntax :

sword OCINlsGetInfo ( void        *hndl, 
OCIError    *errhp, 
OraText     *buf, 
size_t      buflen, 
ub2         item );

Parameters :

Parameter Description
hndl (IN/OUT) The OCI environment or user session handle initialized in object mode.
errhp (IN/OUT) The error handle. If any error occurs, the function records it in errhp and returns a NULL pointer. You can call the OCIErrorGet function to obtain the diagnostic information.
buf (OUT) The pointer to the destination buffer. The returned string ends with a NULL character.
buflen (IN) The size of the destination buffer. The maximum length of each piece of information is OCI_NLS_MAXBUFSZ bytes. OCI_NLS_MAXBUFSIZE: When you call the OCINlsGetInfo function, you must allocate a buffer to store the returned information. The buffer size depends on the item that you are querying and the encoding that you use to store the information. The OCI_NLS_MAXBUFSZ attribute ensures that the buffer is big enough to accommodate the largest item that the OCINlsGetInfo function returns.
item (IN) The item in the OCI environment handle to return. For information about the value, see the table in the Parameter values section.

Return value : OCI_SUCCESS is returned if the function call succeeded. Otherwise, OCI_INVALID_HANDLE or OCI_ERROR is returned.

Parameter values

Parameter value Description
OCI_NLS_DAYNAME1 The native name of Monday.
OCI_NLS_DAYNAME2 The native name of Tuesday.
OCI_NLS_DAYNAME3 The native name of Wednesday.
OCI_NLS_DAYNAME4 The native name of Thursday.
OCI_NLS_DAYNAME5 The native name of Friday.
OCI_NLS_DAYNAME6 The native name of Saturday.
OCI_NLS_DAYNAME7 The native name of Sunday.
OCI_NLS_ABDAYNAME1 The abbreviated native name of Monday.
OCI_NLS_ABDAYNAME2 The abbreviated native name of Tuesday.
OCI_NLS_ABDAYNAME3 The abbreviated native name of Wednesday.
OCI_NLS_ABDAYNAME4 The abbreviated native name of Thursday.
OCI_NLS_ABDAYNAME5 The abbreviated native name of Friday.
OCI_NLS_ABDAYNAME6 The abbreviated native name of Saturday.
OCI_NLS_ABDAYNAME7 The abbreviated native name of Sunday.
OCI_NLS_MONTHNAME1 The native name of January.
OCI_NLS_MONTHNAME2 The native name of February.
OCI_NLS_MONTHNAME3 The native name of March.
OCI_NLS_MONTHNAME4 The native name of April.
OCI_NLS_MONTHNAME5 The native name of May.
OCI_NLS_MONTHNAME6 The native name of June.
OCI_NLS_MONTHNAME7 The native name of July.
OCI_NLS_MONTHNAME8 The native name of August.
OCI_NLS_MONTHNAME9 The native name of September.
OCI_NLS_MONTHNAME10 The native name of October.
OCI_NLS_MONTHNAME11 The native name of November.
OCI_NLS_MONTHNAME12 The native name of December.
OCI_NLS_ABMONTHNAME1 The abbreviated native name of January.
OCI_NLS_ABMONTHNAME2 The abbreviated native name of February.
OCI_NLS_ABMONTHNAME3 The abbreviated native name of March.
OCI_NLS_ABMONTHNAME4 The abbreviated native name of April.
OCI_NLS_ABMONTHNAME5 The abbreviated native name of May.
OCI_NLS_ABMONTHNAME6 The abbreviated native name of June.
OCI_NLS_ABMONTHNAME7 The abbreviated native name of July.
OCI_NLS_ABMONTHNAME8 The abbreviated native name of August.
OCI_NLS_ABMONTHNAME9 The abbreviated native name of September.
OCI_NLS_ABMONTHNAME10 The abbreviated native name of October.
OCI_NLS_ABMONTHNAME11 The abbreviated native name of November.
OCI_NLS_ABMONTHNAME12 The abbreviated native name of December.
OCI_NLS_YES The native string for an affirmative response.
OCI_NLS_NO The native negative response.
OCI_NLS_AM The native equivalent string of ante meridiem (AM).
OCI_NLS_PM The native equivalent string of post meridiem (PM).
OCI_NLS_AD The native equivalent string of anno Domini (AD).
OCI_NLS_BC The native equivalent string of before Christ (BC).
OCI_NLS_DECIMAL A decimal character.
OCI_NLS_GROUP A group separator.
OCI_NLS_DEBIT The native symbol of debit.
OCI_NLS_CREDIT The native symbol of credit.
OCI_NLS_DATEFORMAT The date format in Oracle Database.
OCI_NLS_INT_CURRENCY The international currency symbol.
OCI_NLS_DUAL_CURRENCY The dual currency symbol.
OCI_NLS_LOC_CURRENCY The locale currency symbol.
OCI_NLS_LANGUAGE The name of the language.
OCI_NLS_ABLANGUAGE The abbreviated name of the language.
OCI_NLS_TERRITORY The name of the territory.
OCI_NLS_CHARACTER_SET The character set name.
OCI_NLS_LINGUISTIC_NAME The linguistic sort name.
OCI_NLS_CALENDAR The calendar name.
OCI_NLS_WRITING_DIR The writing direction of the language.
OCI_NLS_ABTERRITORY The abbreviated name of the territory.
OCI_NLS_DDATEFORMAT The default date format in Oracle Database.
OCI_NLS_DTIMEFORMAT The default time format in Oracle Database.
OCI_NLS_SFDATEFORMAT The format of local date.
OCI_NLS_SFTIMEFORMAT The format of local time.
OCI_NLS_NUMGROUPING The number grouping field.
OCI_NLS_LISTSEP The list separator.
OCI_NLS_MONDECIMAL The monetary decimal character.
OCI_NLS_MONGROUP The monetary group separator.
OCI_NLS_MONGROUPING The monetary grouping field.
OCI_NLS_INT_CURRENCYSEP The international currency separator.

Previous topic

Describe functions
Last

Next topic

Define functions
Next
What is on this page
OCINlsEnvironmentVariableGet
OCINlsGetInfo
Parameter values