-
Sorry if this is a noob question. I'm not at all up to date with JavaScript... I'm trying to port a filter which I wrote for the Lua implementation to JavaScript. The idea is to take symbols which look like a decimal ( |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You might be look for
|
Beta Was this translation helpful? Give feedback.
You can than subsequently encode the resulting string into whatever encoding you need using the TextEncoder API:
https://developer.mozilla.org/en-US/docs/Web/API/Encoding_API
Though it feels like an XY problem perhaps? In JS, you are expected to just use strings and mostly not care about their encoding.
Perhaps this will help: in Lua, like in C or Zig or Python2, strings are just sequence of bytes. Lua as a language is encoding-agnostic, but you, as a programmer, had to care about not confusing encodings fairly often.
In JavaScript, strings are fairly opaque objects, a…