Index: HTML/EN/html/docs/cli-api.html =================================================================== --- HTML/EN/html/docs/cli-api.html (revision 31846) +++ HTML/EN/html/docs/cli-api.html (working copy) @@ -24,8 +24,7 @@ The end of line separator is line feed (<LF> ASCII decimal 10, hexadecimal 0x0A). The server accepts LF, CR or 0x00 (or any combination thereof) as end of line, and replies with whatever was used for the command. - For strings, Squeezebox Server uses the UTF-8 charset. Some extended queries allow - to return data in a different charset. + For strings, Squeezebox Server uses the UTF-8 character-set encoding.
To use the command line interface interactively, use the telnet @@ -54,6 +53,7 @@
Returned tagged parameters: @@ -2705,15 +2677,6 @@ Description -
Returned tagged parameters: @@ -3052,15 +3015,6 @@ by a letter (see below). The default value is empty. -
Returned tagged parameters: @@ -3238,15 +3192,6 @@ by a letter (see below). The default value is empty. -
Returned tagged parameters: @@ -3454,15 +3399,6 @@ by a letter (see below). The default value is "l". -
Returned tagged parameters: @@ -3685,15 +3621,6 @@ Return only the specified year. -
Returned tagged parameters: @@ -3824,15 +3751,6 @@ by a letter (see below). The default value is empty. -
Returned tagged parameters: @@ -3976,15 +3894,6 @@ by a letter (see below). The default value is empty. -
Returned tagged parameters: @@ -4122,11 +4031,6 @@ for a list of possible fields and their identifying letter). The default tags value for this command is "gald". -
Returned tagged parameters:
- charset - | -- Character set to use to return data. See - charset notes above. - | -
Returned tagged parameters: @@ -4293,15 +4188,6 @@ The name of the playlist (without .m3u). -
Returned tagged parameters: @@ -4538,15 +4424,6 @@ url (u) and the multi-valued tags for genre(s) (G & P) and artists (A & S) -
Returned tagged parameters: @@ -5155,15 +5032,6 @@ possible only if tracks are defined and for a single album. -
Returned tagged parameters: @@ -5289,15 +5157,6 @@ Search string -
Returned tagged parameters: @@ -6284,15 +6143,6 @@
Returned tagged parameters: @@ -6657,15 +6507,6 @@
Returned tagged parameters:
- charset - | -- Character set to use to return data. See - charset notes above. - | -
Returned tagged parameters: @@ -8409,15 +8227,6 @@ If set to 1, urls are returned by the query, otherwise they aren't. -
Returned tagged parameters: @@ -8736,15 +8545,6 @@ If set to 1, urls are returned by the query, otherwise they aren't. -
Returned tagged parameters:
Index: Slim/Control/Stdio.pm
===================================================================
--- Slim/Control/Stdio.pm (revision 31847)
+++ Slim/Control/Stdio.pm (working copy)
@@ -128,8 +128,9 @@
# add clientid if there is a client
unshift @elements, $clientid if defined $clientid;
+
# escape all the terms
- do { utf8::encode($_) if utf8::is_utf8($_); $_ = URI::Escape::uri_escape($_) } foreach @elements;
+ map { $_ = URI::Escape::uri_escape_utf8($_) } @elements;
# join by space and return!
return join " ", @elements;
Index: Slim/Control/Request.pm
===================================================================
--- Slim/Control/Request.pm (revision 31847)
+++ Slim/Control/Request.pm (working copy)
@@ -2267,18 +2267,7 @@
sub fixEncoding {
my $self = shift || return;
- my $encoding = ${$self->{'_params'}}{'charset'} || return;
-
- while (my ($key, $val) = each %{$self->{'_params'}}) {
-
- if (!ref($val)) {
-
- # wrap decode in eval, as an incorrect encoding type could hang CLI
- eval { ${$self->{'_params'}}{$key} = Slim::Utils::Unicode::decode($encoding, $val) };
-
- $@ && $log->is_warn && $log->warn($@);
- }
- }
+ map {utf8::decode($_) unless ref $_ || utf8::is_utf8($_)} values %{$self->{'_params'}};
}
################################################################################
@@ -2312,7 +2301,6 @@
# returns the request as an array
sub renderAsArray {
my $self = shift;
- my $encoding = shift;
if (!$self->{'_useixhash'}) {
logBacktrace("request should set useIxHashes in Slim::Control::Request->new()");
@@ -2335,8 +2323,6 @@
# no output
next if ($key =~ /^__/);
- $val = Slim::Utils::Unicode::utf8encode($val, $encoding) if $encoding;
-
if ($key =~ /^_/) {
push @returnArray, $val;
} else {
@@ -2358,8 +2344,6 @@
while (my ($key2, $val2) = each %{$hash}) {
- $val2 = Slim::Utils::Unicode::utf8encode($val2, $encoding) if $encoding;
-
if ($key2 =~ /^__/) {
# no output
} elsif ($key2 =~ /^_/) {
@@ -2376,9 +2360,6 @@
if (ref $val eq 'ARRAY') {
$val = join (',', @{$val})
}
- elsif ($encoding && !ref $val) {
- $val = Slim::Utils::Unicode::utf8encode($val, $encoding);
- }
if ($key =~ /^_/) {
push @returnArray, $val;
Index: Slim/Plugin/CLI/Plugin.pm
===================================================================
--- Slim/Plugin/CLI/Plugin.pm (revision 31847)
+++ Slim/Plugin/CLI/Plugin.pm (working copy)
@@ -33,7 +33,7 @@
# subscribe
# Other CLI queries/commands are handled through Request.pm
#
-# This module also handles parameters "charset" and "subscribe"
+# This module also handles parameter "subscribe"
my $cli_socket; # server socket
my $cli_socket_port = 0; # CLI port on which socket is opened
@@ -565,7 +565,7 @@
return if !defined $request;
- # fix the encoding and/or manage charset param
+ # fix the encoding
$request->fixEncoding();
# remember we're the source and the $client_socket
@@ -702,9 +702,8 @@
$client_socket = $request->connectionID() unless defined $client_socket;
- my $encoding = $request->getParam('charset') || undef; # default is utf8
- my @elements = $request->renderAsArray($encoding);
+ my @elements = $request->renderAsArray();
my $output = Slim::Control::Stdio::array_to_string($request->clientid(), \@elements);
Index: Changelog7.html
===================================================================
--- Changelog7.html (revision 31846)
+++ Changelog7.html (working copy)
@@ -50,9 +50,10 @@
-