If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
Announcement
Collapse
No announcement yet.
Search skills to create a plugin for Pcp running on Pi4.
it is also curious to see how the spaces are managed with %20 !
URL-encoding - very common when you do not want embedded spaces to confuse the parsing of data.
Accented chars also: Ga%C3%ABtan
What kind of coding is it ?
UTF-8 - from 2nd paragraph in the built-in documentation in LMS
"For strings, Logitech Media Server uses the UTF-8 character-set encoding."
Is it possible to configure it to ASCII ?
No. I expect you will be able to find a UTF8 handling library - or just map the few accented characters that you know you will see if you do not plan to make this available to anyone else.
Paul Webster Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin
dc%3Aa6%3A32%3A75%3A45%3A0a title WOULD%20I%20LIE%20TO%20YOU[/CODE]
it is also curious to see how the spaces are managed with %20 !
Accented chars also: Ga%C3%ABtan
What kind of coding is it ?
Is it possible to configure it to ASCII ?
Two reason
1. Spaces are significant as a separator of keyword/parameters to distinguish from LMS values returned
2. Data from LMS is UTF8 and so non ASCII with accented/foreign characters (e.g. chinese ) are in values returned.
So HTML encoding so spaces and UTF8 characters in LMS returned values can be passed on accurately.
Ga%C3%ABtan = Gaƫtan
Last edited by bpa; 2022-01-24, 16:38.
Reason: clarify 2nd point
I told you about readsq.py a many post ago.
It uses the Python library to decode the HTML encoded string into the internal Python string (which supports UTF8).
You're going in circles.
Output from a modified readsq has to go out on the serial port but as discussed earlier PCP micropython doesn't support threading or perhaps pyserial. Which is why "nc" is being used.
Last edited by bpa; 2022-01-25, 13:56.
Reason: typos
I told you about readsq.py a many post ago.
It uses the Python library to deocde the HTML encoded string into the internal Pyhtoin string (which supports UTF8).
You're going in circles.
Output from a modified readsq has to go out on the serial port but as discussed earlier PCP micropython doesn't support threading or perhaps pyserial. Which is why "nc" is being used.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, personalize advertising, and to analyze site activity. We may share certain information about our users with our advertising and analytics partners. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment