Ok, sorry now I realize what's going on. Historically, `shoutcast` metadata are
encoded using the `latin1` encoding. However, there's no representation of a
lot of characters in `latin1` such as the one you're trying from polish
language and, so, the conversion fails.
The only option is to force `output.shoutcast` to send metadata using the
`utf8` encoding. However, some of your listener clients may not know about that
and still expect `latin1` strings, resulting in issues displaying metadata. I'm
afraid that there's not much room for more here, expect perhaps cleaning out
metadata to map to the nearest `latin1` character, for instance `ę` to `e` and
etc.
I've just added a change that allows to change `output.shoutcast`'s metadata
encoding. I think that this is the best I can do for you here. Feel free to
test, either with the latest code or by adding this on top of your script:
```
def output.shoutcast(
~id="output.shoutcast",~start=true,
~host="localhost",~port=8000,
~user="",~password="hackme",
~genre="",~url="",~name="",~encoding="ISO-8859-1",
~public=true,~icy_id=1, ~format="",~dj={""},
~dumpfile="", ~icy_metadata="guess",
~on_connect={()}, ~on_disconnect={()},
~aim="",~icq="",~irc="",~icy_reset=true,
~fallible=false,~on_start={()},~on_stop={()},
~on_error=fun(_)->3., e,s) =
icy_reset = if icy_reset then "1" else "0" end
headers = [("icy-aim",aim),("icy-irc",irc),
("icy-icq",icq),("icy-reset",icy_reset)]
def map(m) =
dj = dj()
if dj != "" then
list.add(("dj",dj),m)
else
m
end
end
s = map_metadata(map,s)
output.icecast(
e, format=format, icy_id=icy_id,
id=id, headers=headers,
start=start,icy_metadata=icy_metadata,
on_connect=on_connect, on_disconnect=on_disconnect,
host=host, port=port, user=user, password=password,
genre=genre, url=url, description="UNUSED",
public=public, dumpfile=dumpfile,encoding=encoding,
name=name, protocol="icy",on_error=on_error,
fallible=fallible,on_start=on_start,on_stop=on_stop,
s)
end
```
And then:
```
output.shoutcast(%fdkaac(bitrate=96,samplerate=44100,channels=2),name="Name",genre="Genre",url="http://website.tld",public=true,host="localhost",port=8000,password="pass",encoding="UTF-8",on_error=(fun
(_) -> 10.),radio)
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/savonet/liquidsoap/issues/411#issuecomment-414681650
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users