Text.Code
---------

Queries the number of a character.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Text](component_Text.md) | [5.2](newinversion52.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Text.Code"; Char ) 

**MBS**( **"Text.Code";** /\* Queries the number of a character. \*/  
**$Char**) /\* The text character to look at.e.g. "😀" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Char | The text character to look at. | "😀" |

### Result

Returns text or error.

### Description

Queries the number of a character.  
Returns the unicode code point. Compared to FileMaker's Code() function, this function does handle codes over 65535.  
  
See also [Text.Character](TextCharacter.md).  
### Examples

Query code for a smiley:

 MBS ( "Text.Code"; "😀" )  
<small>  
Example result: 128512</small>### See also

- [Text.Character](TextCharacter.md)

### Blog Entries

- [MBS FileMaker Plugin, version 5.2pr2](https://www.mbsplugins.de/archive/2015-06-08/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)
- [Just added functions](https://www.mbsplugins.de/archive/2015-06-04/Just_added_functions/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 4/2025, Seite 23](https://filemaker-magazin.de/neuigkeit/4297-Appetithappen-FMM_202504)

This function is free to use.

Created 4th June 2015 , last changed 9th November 2021

  
[Text.Characters](TextCharacters.md) - [Text.Concat](TextConcat.md)

[HTML Version](TextCode.shtml)