# How to get FString Unicode representation?

**URL:** <https://forums.unrealengine.com/t/how-to-get-fstring-unicode-representation/413471>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [December 31, 2017, 4:22pm UTC](https://forums.unrealengine.com/t/how-to-get-fstring-unicode-representation/413471 "2017-12-31T16:22:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Juvarunst](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Juvarunst](https://forums.unrealengine.com/u/Juvarunst)\
**Post date:** [December 31, 2017, 4:22pm UTC](https://forums.unrealengine.com/t/how-to-get-fstring-unicode-representation/413471/1 "2017-12-31T16:22:07Z")

</div>

I want get FString’s numeric Unicode representation of the first letter

in UE3 I can use Asc() function:

Asc

int Asc ( string S )  
The Asc() function returns the numeric Unicode representation of the first letter of the given string S.

Example:

Asc(“A”); //returns 65

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [December 31, 2017, 8:20pm UTC](https://forums.unrealengine.com/t/how-to-get-fstring-unicode-representation/413471/2 "2017-12-31T20:20:32Z")

</div>

Because it not really needed in C++ or even C as you can directly cast any type to int as all variables are sequences of bytes which can be casted to int. FString is array of TCHARs so you can use [] to get perticilar char

```
(int32)String[0]

```

I also find `TChar<TCHAR>::ConvertCharDigitToInt(String[0]);` that does similar thing:

```
static inline int32 ConvertCharDigitToInt(CharType Char)
{
	return static_cast<int32>(Char) - static_cast<int32>('0');
}

```

> **[TChar::ConvertCharDigitToInt](https://docs.unrealengine.com/5.1/en-US/API/Runtime/Core/Misc/TChar/ConvertCharDigitToInt/)**

---

<div class="post-metadata">

**Author:** ![Juvarunst](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Juvarunst](https://forums.unrealengine.com/u/Juvarunst)\
**Post date:** [January 1, 2018, 10:34am UTC](https://forums.unrealengine.com/t/how-to-get-fstring-unicode-representation/413471/3 "2018-01-01T10:34:21Z")

</div>

I’m trying

---

<div class="post-metadata">

**Author:** ![Juvarunst](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Juvarunst](https://forums.unrealengine.com/u/Juvarunst)\
**Post date:** [January 1, 2018, 10:42am UTC](https://forums.unrealengine.com/t/how-to-get-fstring-unicode-representation/413471/4 "2018-01-01T10:42:00Z")

</div>

it work, thank you
