ChrU$() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Returns a one-character string corresponding to a specified character code. This function is the Unicode corollary of the Chr$() function, so that the num_expr encoding maps to the Unicode character codes rather than the system environment character codes. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

ChrU$( num_expr ) 

num_expr is an integer value from 0 to 65,535, inclusive.

Return Value

String

Description

The ChrU$() function returns a string, one character long, based on the character code specified in the num_expr parameter.

Note: Except for the character encoding mapping, the usage and behavior of ChrU$() is the same as Chr$(). ChrU$() is only applicable for Unicode version of MapInfo Pro and returns a [space] character in non-Unicode MapInfo Pro.

Example

The following example displays the Unicode character "€", the Unicode Arabic character "س", and the Unicode Traditional Chinese character "弊":

Note ChrU$(8364)  
Note ChrU$(1587) 
Note ChrU$(24330)

See Also:

CharVal() function, Chr$() function, Character Code Table Definitions