K
K
khomaldi2020-05-23 15:15:27
Dart
khomaldi, 2020-05-23 15:15:27

Why does dart use utf-16?

Hello.

Can you please tell me why Dart uses utf-16 and not utf-8? What do you need to know about this format when creating a project? Are there any pitfalls?

Thanks :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
MiT, 2020-05-24
@khomaldi

As for me, utf-16 was chosen as a balance between size in bytes (utf-8) and performance (utf-32). It is faster than utf-8, but not as large as utf-32.
Also, Windows and some Linux OSes use utf-16 by default, and Dart wants to be a multi-platform development tool.
In development, this does not wag in any way, you can also use utf-8, usingdart:convert

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question