ceylon icon indicating copy to clipboard operation
ceylon copied to clipboard

cross-platform way to obtain UTF8 bytes

Open gavinking opened this issue 7 years ago • 31 comments

Currently there is no cross-platform way to convert a String to a UTF8 byte stream or array. I've long thought this was a bit silly, since it's an easy-enough operation in both Java and JS. We currently have ceylon.buffer.charset, but that's JVM-only, and carries a bunch of baggage.

I think this is a reasonable thing to add to the language module, but where should it go:

  • String itself?
  • process or runtime?

gavinking avatar Apr 02 '18 14:04 gavinking