Converting user-supplied strings/text to EBCDIC hexadecimal characters

Welcome to the Julia language community.

I just had to answer, as this may be the most obscure question I’ve seen on Julia discourse, no offense.

May I ask, why? Is it just curiosity with programming, or dare I say school assignment?

It seem what you may be after is:

Note, Julia only supports UTF-8, as it’s the default for the future (but you can also do 8-bit byte strings with no, or user-defined meaning). And well UTF-16 to/from UTF-8 (for e.g. Windows). Intentionally other encodings are left out, of the standard library, including Latin1 etc. let alone obscure like EBCDIC.

Note, ASCII is supported by (7-bit) ASCII being a subset of UTF-8. “Extended ASCII”

If you need any of that, you must use a package, such as that one (there might be more).

[If there’s anything more obscure, it might be UTF-EBCDIC.]

You wouldn’t be able to convert everything from a webpage to EBCDIC (or ASCII), if you allow any UTF-8 input as it seems you’re doing.

There are some other threads such as this one that might be helpful:

You CAN do web programming in Julia (your question wasn’t how), but I see the code you use is for a different language, likely JavaScript? And you can use it with, or avoid it, but if it works for you great. Then the question is likely warranted elsewhere. I’m not sure, but did you post to this community by accident?

FYI: EBCDIC-platforms, i.e. mainframes, are not supported by Julia. I realize you’re not targeting those?! Just having a valid question on converting the encoding, that you can do on any platform.