3 ms·
That's how e.g. Python and Go do it. It's not pretty, but it is reliable. Going the other direction - calling programs with non-ASCII arguments is also a pain.
by Asooka 5y ago
That's how e.g. Python and Go do it. It's not pretty, but it is reliable. Going the other direction - calling programs with non-ASCII arguments is also a pain. I remember having to manually encode everything in the "mbcs" locale when invoking a subprocess with Python 2. I think Python 3 handles it properly now, but it has been a while.