> Date: Tue, 08 May 2012 21:18:17 -0700
> From: Paul Eggert <[email protected]>
> CC: Eli Zaretskii <[email protected]>, [email protected]
> 
> Are there restrictions about what can go into the strings?
> For example, can they contain UTF-8 encoding errors?

Can you be more specific in your question?  Are you asking whether any
byte stream is allowed in the command-line arguments?  Or are you
asking something else?

In general, Windows assumes that the characters used in a command line
are either from the locale-dependent character set or in UTF-16.  The
API called by the program determines which one of these is expected.
Characters or bytes that are incompatible with this assumption will
either be replaced with blanks or '?' or '_', or be interpreted as
belonging to the expected character set (and may produce unexpected
effects).  Either way, there's no way (AFAIK) to quote those invalid
(or shall I say "unexpected") characters.  They simply should not be
present, period.

Reply via email to