Skip to main content
Solved

TextEncoder failing to encode Roman numbers and special characters

  • January 4, 2024
  • 1 reply
  • 20 views

sanghostevielee
Contributor
Forum|alt.badge.img

Hi all,

 

I need to extract the Hex Code Point of multiple letters using TextEncoder.

However, the transformer fails to encode Roman numbers and some special characters. You can see in the below screenshot that it successfully encodes Bengali letters and some special characters, but not the others.

Anyone has an idea how to solve it or any workarounds? Thanks!

 

image

Best answer by david_r

From the documentation, under the "Unicode" heading: All characters with standard ASCII representations are not encoded. In this context, it seems to indicate 7-bit ASCII.

If you want to encode these characters, you can encode them to HEX and optionally prefix the result with "\\u00" to get the corresponding Unicode code point.

View original
Did this help you find an answer to your question?

1 reply

david_r
Celebrity
  • Best Answer
  • January 4, 2024

From the documentation, under the "Unicode" heading: All characters with standard ASCII representations are not encoded. In this context, it seems to indicate 7-bit ASCII.

If you want to encode these characters, you can encode them to HEX and optionally prefix the result with "\\u00" to get the corresponding Unicode code point.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings