News for hackers. Stuff that matters.
Re:Zig 0.9.0 by rightbyte on Tuesday December 21, 2021 @05:47AM (#29636062)
> Many programs, in particular non-graphical programs don't need any UTF-8 code at all - UTF-8 handling is basically memcpy().

argv to main is utf8 on my system.

Re:Zig 0.9.0 by jstimpfle on Tuesday December 21, 2021 @09:38AM (#29637723)
On Unix/Linux, it is binary data without any restrictions except that each argument is zero-terminated (the typical argument is probably UTF-8 if you have set a UTF-8 locale). You'll see exactly the bytes that were put in as arguments to execlp() et. al. by the parent process.

On Windows, I believe it is Unicode converted to current codepage.

In any case I don't need to care about it since I can simply treat arguments as ASCII-extended opaque strings as described.

Re:Zig 0.9.0 by anonymoushn on Wednesday December 22, 2021 @09:19AM (#29649611)
> argv to main is utf8 on my system.

That sounds totally compatible with programs that don't know anything about utf8. Do programs need to normalize the utf8 you pass in before using it as an argument to open(2) or something?