Character encoding problem with FString::Contains

@F1nansist I got an international version working!

Digging through the various files and documentations I stumbled upon FTextTransformer

You just need add

#include "Internationalization/TextTransformer.h" 

Then you can try

	FString s(TCHAR_TO_UTF16(*passedText));					
	FString passedTextLow = FTextTransformer::ToLower(s);
	FString passedTextUP = FTextTransformer::ToUpper(s);

Where passedText is a FString

Seems to work with many other languages. I tested it with Polish and it does upper case and lower case well, also did a quick test with some Russian letters and seems to handle them well :slight_smile:


@EpicChris I was wondering if someone from the staff could maybe incorporate a comparison like this natively for unicode test of the contains function for strings?

Native uppercase & lowercase for FText should use UTF16 with FTextTransformer or at least have an option for unicode compliant conversion? (maybe a bool)

2 Likes