-
-
Notifications
You must be signed in to change notification settings - Fork 224
Open
Description
Hello,
First of all, thank you for this guide!
I'm new to Zig, and I cannot see a section in the guide about strings and unicode.
What I understood was that ascii is handled as []u8, but unicode quickly became a question mark as soon as I wrote in French and Chinese.
That's where things are unclear and not talked about in the doc.
For example, I was surprised by this not printing the right characters:
const data = "abc好";
for (data) |character| {
std.debug.print("Here is a '{u}'\n", .{character});
}
Checking online, there is an old lib lacking a maintainer: https://codeberg.org/dude_the_builder/zigstr
So, perhaps it would be nice to have a sections about strings in general and how to handle unicode by default?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels