Daniel Robinson
Daniel Robinson

Reputation: 14878

dart, total available string characters?

I'm not familiar with character sets and whether languages pick them up from their environments or if they are baked into the language itself, I wanted to make a simple number system in dart that has the largest possible base it can have, like hex has 0-9a-f I would have every single character in some specified ascending order with lower case and upper case having different values to give me the largest possible base to my number system. I want to do this so I can send numbers as strings with as few characters as possible, so my question is, does dart have a standard baked in character set that I can be certain will exist in every environment it runs in?

Upvotes: 0

Views: 75

Answers (1)

Günter Zöchbauer
Günter Zöchbauer

Reputation: 657536

You should be able to use every value even if no concrete character is assigned to a code. This would only be a problem when you try to display the character.

Some codes are control characters with special meaning (like 0x0000) which you should avoid more info here: http://www.unicode.org/Public/UNIDATA/UnicodeData.txt.

If you want to transport the result over the internet using text protocols you may be limited to ASCII. In this case I suggest Base64 encoding.

Upvotes: 1

Related Questions