The following paragraph should be added:
escapeshellarg() will strip all invalid characters according to your locale settings (e.g. latin-1 characters are stripped when locale/LC_CTYPE is UTF-8). Please keep in mind that the locale support depends on you C standard library while compiling. This might result in strange behavior on embedded systems.