Tizen Native API
i18n
Utils

The i18n module contains uchar, ucollator, unormalization, usearch, ustring, ucalendar, udate, udatepg, ulocale and unumber. This module provides flexible generation of number or date format patterns and helps you format and parse dates/number for any locale.

Required Header

#include <utils_i18n.h>

Overview

API Description
Timezone The Timezone module represents a time zone offset, and also figures out daylight savings.
Ucollator Ucollator module performs locale-sensitive string comparison. It builds searching and sorting routines for natural language text and provides correct sorting orders for most locales.
Uchar Uchar module provides low-level access to the Unicode Character Database.
Unormalization Unormalization module provides Unicode normalization functionality for standard unicode normalization.
Usearch Usearch module provides language-sensitive text searching based on the comparison rules defined in a ucollator data struct.
Ustring Ustring module provides general unicode string handling.
Ucalendar Ucalendar is used for converting between a i18n_udate type and a set of integer fields such as I18N_UCALENDAR_YEAR, I18N_UCALENDAR_MONTH, I18N_UCALENDAR_DATE, I18N_UCALENDAR_HOUR, and so on.
Udate Udate module consists of functions that convert dates and times from their internal representations to textual form and back again in a language-independent manner.
Udatepg Udatepg module provides flexible generation of date format patterns, like "yy-MM-dd".
Ulocale A ulocale represents a specific geographical, political, or cultural region.
Unumber Unumber helps you format and parse numbers for any locale.

Mapping Table

Module Native API ICU API
Timezone i18n_timezone_create_unknown getUnknown
Timezone i18n_timezone_create_gmt getGMT
Timezone i18n_timezone_create createTimeZone
Timezone i18n_timezone_destroy
Timezone i18n_timezone_foreach_timezone_id_by_region createTimeZoneIDEnumeration
Timezone i18n_timezone_foreach_timezone_id createEnumeration
Timezone i18n_timezone_foreach_timezone_id_with_offset createEnumeration
Timezone i18n_timezone_foreach_timezone_id_by_country createEnumeration
Timezone i18n_timezone_count_equivalent_ids countEquivalentIDs
Timezone i18n_timezone_get_equivalent_id getEquivalentID
Timezone i18n_timezone_create_default createDefault
Timezone i18n_timezone_set_default setDefault
Timezone i18n_timezone_get_tzdata_version getTZDataVersion
Timezone i18n_timezone_get_region getRegion
Timezone i18n_timezone_get_offset_with_date getOffset
Timezone i18n_timezone_set_raw_offset setRawOffset
Timezone i18n_timezone_get_raw_offset getRawOffset
Timezone i18n_timezone_get_id getID
Timezone i18n_timezone_set_id setID
Timezone i18n_timezone_get_display_name getDisplayName
Timezone i18n_timezone_get_display_name_with_locale getDisplayName
Timezone i18n_timezone_get_display_name_with_type getDisplayName
Timezone i18n_timezone_get_display_name_with_type_locale getDisplayName
Timezone i18n_timezone_use_daylight_time useDaylightTime
Timezone i18n_timezone_in_daylight_time inDaylightTime
Timezone i18n_timezone_has_same_rule hasSameRules
Timezone i18n_timezone_clone clone
Timezone i18n_timezone_get_dst_savings getDSTSavings
Ucalendar i18n_ucalendar_set_default_timezone ucal_setDefaultTimeZone
Ucalendar i18n_ucalendar_get_now ucal_getNow
Ucalendar i18n_ucalendar_create ucal_open
Ucalendar i18n_ucalendar_destroy ucal_close
Ucalendar i18n_ucalendar_clone ucal_clone
Ucalendar i18n_ucalendar_get_timezone_displayname ucal_getTimeZoneDisplayName
Ucalendar i18n_ucalendar_is_in_daylight_time ucal_inDaylightTime
Ucalendar i18n_ucalendar_set ucal_set
Ucalendar i18n_ucalendar_set_attribute ucal_setAttribute
Ucalendar i18n_ucalendar_get_attribute ucal_getAttribute
Ucalendar i18n_ucalendar_get_milliseconds ucal_getMillis
Ucalendar i18n_ucalendar_set_milliseconds ucal_setMillis
Ucalendar i18n_ucalendar_set_date_time ucal_setDateTime
Ucalendar i18n_ucalendar_is_equivalent_to ucal_equivalentTo
Ucalendar i18n_ucalendar_add ucal_add
Ucalendar i18n_ucalendar_get ucal_get
Uchar i18n_uchar_get_int_property_value u_getIntpropertyValue
Uchar i18n_uchar_get_ublock_code ublock_getCode
Ucollator i18n_ucollator_create ucol_open
Ucollator i18n_ucollator_destroy ucol_close
Ucollator i18n_ucollator_str_collator ucol_strcoll
Ucollator i18n_ucollator_equal ucol_equal
Ucollator i18n_ucollator_set_strength ucol_setStrength
Ucollator i18n_ucollator_set_attribute ucol_setAttribute
Udate i18n_udate_create udat_open
Udate i18n_udate_destroy udat_close
Udate i18n_udate_format_date udat_format
Udatepg i18n_udatepg_create udatpg_open
Udatepg i18n_udatepg_destroy udatpg_close
Udatepg i18n_udatepg_get_best_pattern udatpg_getBestPattern
Ulocale i18n_ulocale_get_default uloc_getDefault
Ulocale i18n_ulocale_set_default uloc_setDefault
Ulocale i18n_ulocale_get_language uloc_getLanguage
Ulocale i18n_ulocale_get_country uloc_getCountry
Ulocale i18n_ulocale_get_display_name uloc_getDisplayName
Ulocale i18n_ulocale_get_available uloc_getAvailable
Ulocale i18n_ulocale_count_available uloc_countAvailable
Unormalization i18n_unormalization_get_instance unorm2_getInstance
Unormalization i18n_unormalization_normalize unorm2_normalize
Unumber i18n_unumber_create unum_open
Unumber i18n_unumber_destroy unum_close
Unumber i18n_unumber_get_symbol unum_getSymbol
Usearch i18n_usearch_create usearch_open
Usearch i18n_usearch_destroy usearch_close
Usearch i18n_usearch_get_matched_text usearch_getMatchedText
Usearch i18n_usearch_get_collator usearch_getCollator
Usearch i18n_usearch_first usearch_first
Ustring i18n_ustring_get_length u_strlen
Ustring i18n_ustring_count_char32 u_countChar32
Ustring i18n_ustring_has_more_char32_than u_strHasMoreChar32Than
Ustring i18n_ustring_cat u_strcat
Ustring i18n_ustring_cat_n u_strncat
Ustring i18n_ustring_string u_strstr
Ustring i18n_ustring_find_first u_strFindFirst
Ustring i18n_ustring_char u_strchr
Ustring i18n_ustring_char32 u_strchr32
Ustring i18n_ustring_r_string u_strrstr
Ustring i18n_ustring_find_last u_strFindLast
Ustring i18n_ustring_r_char u_strrchr
Ustring i18n_ustring_r_char32 u_strrchr32
Ustring i18n_ustring_pbrk u_strpbrk
Ustring i18n_ustring_cspn u_strcspn
Ustring i18n_ustring_spn u_strspn
Ustring i18n_ustring_tokenizer_r u_strtok_r
Ustring i18n_ustring_compare u_strcmp
Ustring i18n_ustring_compare_code_point_order u_strcmpCodePointOrder
Ustring i18n_ustring_compare_binary_order u_strCompare
Ustring i18n_ustring_case_compare_with_length u_strCaseCompare
Ustring i18n_ustring_compare_n u_strncmp
Ustring i18n_ustring_compare_n_code_point_order u_strncmpCodePointOrder
Ustring i18n_ustring_case_compare u_strcasecmp
Ustring i18n_ustring_case_compare_n u_strncasecmp
Ustring i18n_ustring_mem_case_compare u_memcasecmp
Ustring i18n_ustring_copy u_strcpy
Ustring i18n_ustring_copy_n u_strncpy
Ustring i18n_ustring_copy_ua u_uastrcpy
Ustring i18n_ustring_copy_ua_n u_uastrncpy
Ustring i18n_ustring_copy_au u_austrcpy
Ustring i18n_ustring_copy_au_n u_austrncpy
Ustring i18n_ustring_mem_copy u_memcpy
Ustring i18n_ustring_mem_move u_memmove
Ustring i18n_ustring_mem_set u_memset
Ustring i18n_ustring_mem_compare u_memcmp
Ustring i18n_ustring_mem_compare_code_point_order u_memcmpCodePointOrder
Ustring i18n_ustring_mem_char u_memchr
Ustring i18n_ustring_mem_char32 u_memchr32
Ustring i18n_ustring_mem_r_char u_memrchr
Ustring i18n_ustring_mem_r_char32 u_memrchr32
Ustring i18n_ustring_unescape u_unescape
Ustring i18n_ustring_unescape_at u_unescapeAt
Ustring i18n_ustring_to_upper u_strToUpper
Ustring i18n_ustring_to_lower u_strToLower
Ustring i18n_ustring_to_title u_strToTitle
Ustring i18n_ustring_fold_case u_strFoldCase
Ustring i18n_ustring_to_WCS u_strToWCS
Ustring i18n_ustring_from_WCS u_strFromWCS
Ustring i18n_ustring_to_UTF8 u_strToUTF8
Ustring i18n_ustring_from_UTF8 u_strFromUTF8
Ustring i18n_ustring_to_UTF8_with_sub u_strToUTF8WithSub
Ustring i18n_ustring_from_UTF8_with_sub u_strFromUTF8WithSub
Ustring i18n_ustring_from_UTF8_lenient u_strFromUTF8Lenient
Ustring i18n_ustring_to_UTF32 u_strToUTF32
Ustring i18n_ustring_from_UTF32 u_strFromUTF32
Ustring i18n_ustring_to_UTF32_with_sub u_strToUTF32WithSub
Ustring i18n_ustring_from_UTF32_with_sub u_strFromUTF32WithSub

Enumeration Type Documentation

Enumeration for error codes to replace exception handlings.

Enumerator:
I18N_ERROR_NONE 

No error, no warning

I18N_ERROR_MISSING_RESOURCE 

The requested resource cannot be found

I18N_ERROR_INVALID_FORMAT 

Data format is not what is expected

I18N_ERROR_FILE_ACCESS 

The requested file cannot be found

I18N_ERROR_INTERNAL_PROGRAM 

Indicates a bug in the library code

I18N_ERROR_OUT_OF_MEMORY 

Out of memory

I18N_ERROR_INDEX_OUTOFBOUNDS 

Trying to access the index that is out of bounds

I18N_ERROR_INVALID_CHAR_FOUND 

Character conversion: Unmappable input sequence. In other APIs: Invalid character

I18N_ERROR_BUFFER_OVERFLOW 

A result would not fit in the supplied buffer

I18N_ERROR_NOT_SUPPORTED 

Requested operation is not supported in the current context

I18N_ERROR_COLLATOR_VERSION_MISMATCH 

Collator version is not compatible with the base version

I18N_ERROR_USELESS_COLLATOR 

Collator is options only and no base is specified

I18N_ERROR_NO_WRITE_PERMISSION 

Attempt to modify read-only or constant data

I18N_ERROR_RESOURCE_TYPE_MISMATCH 

An operation is requested over a resource that does not support it

I18N_ERROR_TOO_MANY_ALIASES 

Too many aliases in the path to the requested resource

I18N_ERROR_INVALID_PARAMETER 

Invalid function parameter

I18N_ERROR_PERMISSION_DENIED 

Permission denied


Except as noted, this content - excluding the Code Examples - is licensed under Creative Commons Attribution 3.0 and all of the Code Examples contained herein are licensed under BSD-3-Clause.
For details, see the Content License