23
Views
4
Comments
Solved
How do I know which ANSI encoding default?

Hi All,

I am using TextToBinaryData without mention any specific encoding. How do I know what is ANSI encoding default if I not mention?


Screenshot 2023-09-07 100802.png
Solution

Hey Cuong Su ,

The default one is utf-8.

Why :

1)Create one button .

2)Onclick of this button drag and drop the "TextToBinaryData" server action .

3)Use text as "Cuong" and dont use any encoding .

4)now drag and drop a JS and pass the output of "TextToBinaryData" into JS and log the binary.

5)check the output

6)now use encoding as "utf-8".You will get similar output.



Thanks & Regards,

Sudip Pal


Oh, I got it, Thank you so much, really helpful

Are you sure, I believe it is actually ASCII:

https://www.outsystems.com/ideas/7364/change-default-encoding-of-binarydata-api-from-ascii-to-utf-8/

The reason in your example looks the same might as well be, that  "Cuong" contains only relevant ASCII characters. All of ASCII chars are the same as in UTF-8, but not all UTF-8 are present in ASCII

Hi,

According to officially documentation the default is ANSI. The text is a bit confusing. A strategically placed : makes it more clear.

The system's default: ANSI encoding.

ANSI is a sunset of UTF-8.

From

https://success.outsystems.com/documentation/11/reference/outsystems_apis/binarydata_api 

Regards,

Daniël 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.