Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 4 of 4
  1. #1
    Senior Member AndrewFG's Avatar
    Join Date
    Mar 2008
    Posts
    782

    Arcane CLI encoding issue

    Can anyone help me with some arcane issues concerning character encoding of CLI commands?

    I am trying to pass a Norwegian string "Engegårdkvartetten" into a CLI command. According to my research this should be encoded as "Engeg%C3%A5rdkvartetten". However when I send that to the CLI, the response echo appears as "Engeg%C3%83%C2%A5rdkvartetten" as you can see below.
    Code:
    ****  19:10:45.648  CLI Request  v2.2.1.2154  ****
    00%3A04%3A20%3A10%3A0a%3A24 playlist add http%3A%2F%2F192.168.1.31%3A31416%2Fplay.flc%3Fhttp%3A%2F%2F192.168.1.31%3A52100%2FMusic%2FF32893.wav 4.%20wav-16-44100%20-%20Engeg%C3%A5rdkvartetten%20-%20STRING%20QUARTETS
    
    ****  19:10:45.655  CLI Response  v2.2.1.2154  ****
    00%3A04%3A20%3A10%3A0a%3A24 playlist add http%3A%2F%2F192.168.1.31%3A31416%2Fplay.flc%3Fhttp%3A%2F%2F192.168.1.31%3A52100%2FMusic%2FF32893.wav 4.%20wav-16-44100%20-%20Engeg%C3%83%C2%A5rdkvartetten%20-%20STRING%20QUARTETS
    Can anyone please tell me what is going on and how to fix it?
    Regards,
    AndrewFG

    Try out Whitebear. The middleware that joins the two worlds of:
    1. UPnP/DLNA media clients and media players, and,
    2. Squeezebox Server and Squeeze Players
    Download it for free here: http://www.whitebear.ch/mediaserver

  2. #2
    Senior Member AndrewFG's Avatar
    Join Date
    Mar 2008
    Posts
    782
    I found the following interesting article.

    http://mark.stosberg.com/blog/2010/1...s-in-perl.html
    http://mark.stosberg.com/blog/2010/1...ding.html#more

    Can anyone please tell me which of these cited escaping mechanism are actually used by the CLI? A comparison with the CLI response echo seems to indicate "none of the above"...
    Last edited by AndrewFG; 2011-11-18 at 05:50.
    Regards,
    AndrewFG

    Try out Whitebear. The middleware that joins the two worlds of:
    1. UPnP/DLNA media clients and media players, and,
    2. Squeezebox Server and Squeeze Players
    Download it for free here: http://www.whitebear.ch/mediaserver

  3. #3
    Senior Member AndrewFG's Avatar
    Join Date
    Mar 2008
    Posts
    782
    Quote Originally Posted by AndrewFG View Post
    A comparison with the CLI response echo seems to indicate "none of the above"...
    After further testing, I believe that the CLI requests shall NOT be encoded in UTF-8 (as is stated in the documentation) but rather shall be encoded in ANSI in the Active Code Page.

    On the other hand, it seems that the CLI responses are indeed properly encoded in UTF-8

    Thus the following command request encoded in ANSI on the ACP:
    Code:
    aardvark Engegårdkvartetten
    will return the following response which is properly encoded in UTF-8
    Code:
    aardvark Engeg%C3%A5rdkvartetten
    That seems at least to work for my Norwegian text; however (not having a Japanese, Chinese, Arabic, etc. computer) I have no way of testing if this applies generally to all languages / code pages.

    => I think this is a bug in the CLI.
    Regards,
    AndrewFG

    Try out Whitebear. The middleware that joins the two worlds of:
    1. UPnP/DLNA media clients and media players, and,
    2. Squeezebox Server and Squeeze Players
    Download it for free here: http://www.whitebear.ch/mediaserver

  4. #4
    Senior Member AndrewFG's Avatar
    Join Date
    Mar 2008
    Posts
    782
    Quote Originally Posted by AndrewFG View Post
    => I think this is a bug in the CLI.
    => http://bugs.slimdevices.com/show_bug.cgi?id=17784
    Regards,
    AndrewFG

    Try out Whitebear. The middleware that joins the two worlds of:
    1. UPnP/DLNA media clients and media players, and,
    2. Squeezebox Server and Squeeze Players
    Download it for free here: http://www.whitebear.ch/mediaserver

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •