karlheyes / icecast-kh

KH branch of icecast
GNU General Public License v2.0
299 stars 107 forks source link

Charset #249

Closed hmorneau closed 4 years ago

hmorneau commented 5 years ago

I use a mp3 stream with Liquidsoap and the charset seems wrong. The accent éè show as éè The same settings on a Icecast (non KH version) show properly. Any idea?

hmorneau commented 5 years ago

It's seems like Icecast KH is the last of it's kind to expect ISO-8859-1 while Icecast moved to UTF-8 along with others.

karlheyes commented 5 years ago

I was wondering whether it was latin-1/utf8 differences. I'll rchange that on the next update, it was something I have been meaning to do.

karl.

edinsof commented 5 years ago

Hi You change charset and now all my latin radios have problem showing latin letters :(

karlheyes commented 5 years ago

you can set latin1 in mount, or use ISO_8859-1 or some other alias, or even supply charset=latin1 in the parameters to the metadata request. The conversion only applies for the stats part, so a universal charset is really required but per-player is not. The change should apply over reload.

karl.

shortyxs commented 4 years ago

Hi Folks, I hope you don't mind that I bring up this older issue but as it is still marked as open, I just want to drop you few lines.

I'm using the "official" (non KH) icecast and I had to deal with that issue as well. I worked with the BUTT developer and also with the developer of the mAirlist Software on some encoding problems.

What happened here was, that the "official" icecast was switching back and forth between different default settings of the expected META encoding. They went to UTF-8 as the default META encoding in some version but noticed that it breaks a ton of old Encoders, still used today that only support Latin1 Encoding. It was somehow written down in the documentation but many people did not noticed especially the last change back to Latin1 as default. [sarkasm mode on] Also to make it a bit more easy for the admins, thy now expect Latin1 as the default META encoding an all audio formats, except OGG. OGG is still expected to be UTF-8 always. [/sarkasm mode off]

Basically I think sticking with Latin1 encoding as the default, is a good idea, to not break the older encoders, there are really a lot out there. You can always specify that your mount point expects UTF-8 encoding in the mount point config but that option only should be used if you exactly know, what your encoders are doing or even better if your encoder allows to set how you want to transmit your META data to the server I'm not aware of many that allow this. mAirlist now can do that and I assume, Liquidsoap also can. BUTT in future can add the charset=UTF-8 option to the meta update. This version seems to be not published yet. So even on the mount points that use the default Latin1 setting you can deliver UTF-8 META data if you let the server know by adding charset=UTF-8 parameter, as Karl statet already.

Hope that is somehow helpful for anybody. Cheers Malte

karlheyes commented 4 years ago

There are more using utf8 these days but icecast does need to know a default for conversion for stats/directory updates. I've made the master build default to utf8 if not specified but if you wish to use a different default then you can use ./configure ICY_CHARSET=latin1 (or whatever). You can still use tags or charset parameters but some installs don't allow the xml to be changed easily, so you can use that. Maybe an environment var can to checked as well

karl