Problems with escapeshellarg()
Summary
An in-depth look at why PHP's escapeshellarg() can fail in non-UTF-8 locales and produce unreadable logs when deploying across multiple hosts. The article introduces Deployer v8's quote() function, which uses ANSI-C quoting to preserve bytes and improve log readability, and outlines how to migrate existing code and templates. It also covers caveats and cross-platform considerations.