diff --git a/core/data/System/CommandAndCGIScripts.txt b/core/data/System/CommandAndCGIScripts.txt index 9440f30f43..984689fdad 100644 --- a/core/data/System/CommandAndCGIScripts.txt +++ b/core/data/System/CommandAndCGIScripts.txt @@ -1,4 +1,4 @@ -%META:TOPICINFO{author="ProjectContributor" date="1456765822" format="1.1" version="1"}% +%META:TOPICINFO{author="ProjectContributor" date="1483547096" format="1.1" version="1"}% %META:TOPICPARENT{name="DeveloperDocumentationCategory"}% %STARTINCLUDE% ---+ CGI and Command Line Scripts @@ -42,6 +42,15 @@ $ save topic=MyWeb.MyTopic user=admin action=save text="New text of the topic" All parameters require a value, even if that is the empty string. Note that parameters passed on the command-line should *not* be URL-encoded. +*Note:* If any of the arguments will contain utf-8 strings, (ie. when entering a Unicode topic name), you must run the command +using the perlrun argument =-CA=. For example: +
+$ cd /usr/local/foswiki/bin
+$ perl -CA ./save -topic MyWeb.MyÜtf8Töpic -user admin -action save -text "Text with »Äëïöü« utf8 characters."
+
+ +For more details on the perl command line arguments, see [[http://perldoc.perl.org/perlrun.html]]. + ---+++++ "Authentication" in the command line environment Unlike the CGI environment, the default user for command line operations is =AdminUser=. @@ -595,8 +604,8 @@ Uploads an attachment to a topic. The HTTP request is expected to be in =multipa * You can use a tool like =curl= to upload files from the command line using this script. * You can call upload easily from !XmlHttpRequest in Javascript. * You can directly invoke upload from the CLI script.__New with Foswiki 2.1__ - * You must use the Perl CLI options '-CA' if the filename contains non-ASCII characters. - * ex. Run from the bin directory: =perl -CA ./upload filepath="/path/and/filename.dat" filename="attachname.dat" topic=Sandbox.ExistingTopic= + * You must use the Perl CLI options '-CA' if the filename or any other arguments contains utf-8 (non-ASCII) characters. + * ex. Run from the bin directory: =perl -CA ./upload filepath="/path/and/filename.dat" filename="Ãttachname.dat" topic=Sandbox.ExistingÜtf8Topic=
*%X% Note:* The =upload= script can only be called via HTTP POST method. Make sure you specify =method="post"= if you call the =upload= script via a form action. It is not possible to call =upload= from an =<a href ...>= link. diff --git a/core/tools/configure b/core/tools/configure index 8b5e6b5d49..30cac9806b 100755 --- a/core/tools/configure +++ b/core/tools/configure @@ -488,6 +488,8 @@ Use -save to save a new configuration. Use -json and -trace to control the output of this script. +If any command line arguments are utf-8 characters, be sure to run configure using the B command. + =head1 OPTIONS =over 8