On Monday, 27 December 2021 at 09:29:38 UTC, Kagamin wrote:
D strings are plain arrays without any text-specific logic, the element is called code unit, which has a fixed size, and the array length specifies how many elements are in the array. This model is most adequate for memory correctness, i.e. it shows what takes how much memory and where it will fit. D doesn't impose fixed interpretations like characters or code points, because there are many of them and neither is the correct one, you need one or another in different situations. Linux console one example of such situation: it doesn't accept characters or code points, it accepts utf8 code units, using anything else is an error.

So should I just use UTF-8 only for Linux? What about other operating systems? I suppose Unix-based OSs (maybe MacOS as well if I'm lucky) work the same as well. But what about Windows? Unfortunately I have to support this OS too with my library so I should know. If you know and you can tell me of course...

Reply via email to