Skip to content

[DL+] numeric character reference for non latin1 code points #1124

@hairmare

Description

@hairmare

On DAB+ players the show Groovэxpress may be rendered as Groovэpress.

Image

There are also other cases that don't clearly look like they are latin1:

Image

The char э is not supported by DAB+, we should be sending DL+ in latin1.

def _bytes_from_string(string: str) -> BytesIO:
b = BytesIO()
# encode as latin1 since that is what DAB supports
b.write(string.encode("latin1"))
b.seek(0)
return b

In this case, we need to transliterate the show name to GroovExpress (or Groovxpress, Groovexpress, 🤷) for it too look nice on DAB+.

We might have had similar code in production at some point in the past, but got rid of it when we migrated everything to unicode. Most likely we can leverage something like https://github.com/claudep/translitcodec to do the heavy lifting in a way that works for more strings.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions