Difference between revisions of "From UTF16 (LogiX node)"

From Neos Wiki
Jump to navigation Jump to search
m (link basic multilingual plane)
m (note about surrogate)
 
Line 13: Line 13:
  
 
== Usage == <!--T:3-->
 
== Usage == <!--T:3-->
This node takes an integer input and outputs a character. The integer input '''must''' reside within the [https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane Basic Multilingual Plane]. Essentially, this means that input is limited from <code>1</code> to <code>65535</code>. Any input outside this range is undefined.
+
This node takes an integer input and outputs a character. The integer input '''must''' reside within the [https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane Basic Multilingual Plane]. Essentially, this means that input is limited from <code>1</code> to <code>65535</code>. Any input outside this range is undefined. If the integer is within the Unicode surrogates (<code>0xD800</code> to <code>0xDFFF</code>), a dummy character will be outputted with the integer value.
  
 
== Examples == <!--T:4-->
 
== Examples == <!--T:4-->

Latest revision as of 04:48, 10 September 2022

Other languages:
English
From UTF16
'From UTF16' LogiX node
Inputs
  Int UTF16
Outputs
  Char *

The From UTF16 node takes a Unicode codepoint and converts it to its respective character.

Usage

This node takes an integer input and outputs a character. The integer input must reside within the Basic Multilingual Plane. Essentially, this means that input is limited from 1 to 65535. Any input outside this range is undefined. If the integer is within the Unicode surrogates (0xD800 to 0xDFFF), a dummy character will be outputted with the integer value.

Examples

Converting a character to and from its UTF16 Codepoint

Node Menu

Characters
Back + From UTF16 From UTF32 Get Character Is Control Is Digit
Is Letter Is Letter Or Digit Is Lower Is Number Is Punctuation Is Separator Is Surrogate
Is Symbol Is Upper Is White Space String To UTF32 Surrogate Pair To UTF32 To Lower To Upper
To UTF16