question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add String.bytes + Character.bytes and possibly change Character constructor

See original GitHub issue

[@gavinking] We need to add bytes attributes to String and Character to get the UTF-8 encoding. We should also consider the problem of going in the other direction, Byte[]->Character/String, perhaps changing the constructor of Character to accept Byte[0]|Byte[2]|Byte[4].

[Migrated from ceylon/ceylon.language#519]

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
gavinkingcommented, Aug 26, 2017

I’ve considered this issue several times, and always concluded it’s probably not a good idea. Closing.

0reactions
CeylonMigrationBotcommented, Nov 14, 2015

[@gavinking] Not for 1.1, since it seems there is no consensus on whether it would be a good thing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to convert Strings to and from UTF8 byte arrays in Java
You can convert directly via the String(byte[], String) constructor and getBytes(String) method. Java exposes available character sets via the Charset class ...
Read more >
Byte Encodings and Strings (The Java™ Tutorials ...
Byte Encodings and Strings. If a byte array contains non-Unicode text, you can convert the text to Unicode with one of the String...
Read more >
4.5 Byte Strings - Racket Documentation
A byte string can be mutable or immutable. When an immutable byte string is provided to a procedure like bytes-set!, the exn:fail:contract exception...
Read more >
How to use character encoding classes in .NET - Microsoft Learn
NET encoding classes provide a way to store and convert character data. ... The following example uses a single byte array to encode...
Read more >
Strings - Julia Documentation
This allows for efficient indexing into strings by the byte index of an encoded representation rather than by a character index, which cannot...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found