Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Displaying 'Non-Standard' Characters Correctly #35

Open
fritzhildebrand opened this issue Jan 18, 2022 · 3 comments
Open

Not Displaying 'Non-Standard' Characters Correctly #35

fritzhildebrand opened this issue Jan 18, 2022 · 3 comments

Comments

@fritzhildebrand
Copy link

fritzhildebrand commented Jan 18, 2022

When displaying the artist, title or album containing non-standard characters like "&" are not displayed at all or properly. For example, for "Déjà Vu - Crosby, Stills, Nash & Young" it replaces the é and à with other characters and Crosby, Stills, Nash & Young shows as "Crosby, Stills, Nash". Interestingly, refreshing or reloading the page after the song starts results in it showing correctly.

@fritzhildebrand
Copy link
Author

image
An example where "Simon" should be "Simon & Garfunkel"

@Doug-Wyman
Copy link

Doug-Wyman commented Jan 18, 2022

is the browser not loading the proper font before you refresh?
I will keep an eye out to see if it happens on my installation as I keep it up
all the time on my network.

@fritzhildebrand
Copy link
Author

fritzhildebrand commented Jan 19, 2022

To get this to work for me I made some changes to the eventcmd.sh file to cleanup these 'non-standard' characters using sed. This gets rid of incorrect displaying of characters such as é, á, ÷ ...
clean () {
query=$1
clean=$(echo $query | sed 's/ /%20/g; s/&/%26/g; s/+/%2B/g; s/é/%C3%A9/g; s/÷/%C3%B7/g; s/Ã/%C3%A0/g')
echo $clean
}
I call this function for the $title, $artist, $album, $stationName before posting the query. As other weird characters show up I will just add them to the sed command. I am sure there are easier ways of doing this, but it works for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants