The liquidsoap parser does not support utf8 characters unfortunately.
However, you should be able to generate any utf8 character by using the
`url.decode` operator. For instance, I believe the non-breakable space can
be obtained this way:

non_breakable_space = url.decode("%a0")

Then you can use this character in your string operations.

Romain

Le lun. 11 mars 2019 à 19:51, Richard G Elen <re...@brideswell.com> a
écrit :

> A quick and hopefully simple question...
>
> I'm modifying our metadata by concatenating Album and Title strings and
> inserting this into the Title field.
>
> The code looks like this:
>
> def apply_metadata(m) =
>    title = m["title"]
>    artist = m["artist"]
>    album = m["album"]
>    [("artist","#{artist}"),("title","#{album} - #{title}")]
> end
>
> I want to replace the regular spaces in "#{album} - #{title}" with
> non-breaking Unicode spaces*. How would I do this?
>
> Many thanks!
>
> --Richard E
>
> (*Why, you ask? So that I can grab the metadata from the server remotely
> and reliably split the fields into their original content again, without
> worrying about other regular space-dash-space occurrences in the string.)
>
>
>
> _______________________________________________
> Savonet-users mailing list
> Savonet-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/savonet-users
>
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users

Reply via email to