Virgin Media don't understand Unicode


More adventures with Unicode. I logged in to my Virgin Media account to see when my promotional discount would end. Here's what their billing PDF said.

Promotional offer(s) You'Re Receiving A Â2 Loyalty Discount. If You Change Your Package You May Lose This Discount Which Will End 10-OCT-18.

Let'S Ignore The Weird Capitalisation Virgin'S System Uses. What's that  doing there?

Their website says:

 You'Re Receiving A 2 Loyalty Discount. If You Change Your Package You May Lose This Discount Which Will End 10-OCT-18

No  symbol, but also no £ sign. Ah, but let's look at the underlying code.

HTML code from Virgin.

What's that weird character? It is the control character string terminator, of course...

Well, my discount is nearly finished, so I asked them for a larger discount. "Sure!" they said "How does Ÿ3 sound?"

Promotional Offer(s) 6m œ3.00 RIV Discount (until 17th February 2019).

Amusingly, when I copy the Ÿ from that PDF, it shows up as the character œ!

What's Going On?

I've written extensively about how the £ symbol is encoded - but here's a primer.

  • £ in ISO-8859-1 (Latin-1) is decimal 163.
  • £ in Unicode is also 163 - but it gets stored as two UTF-8 bytes - 194 & 163. In hex this is 0xC2 0xA3.
  • In Windows-1252 - the legacy encoding for ancient version of Microsoft's software - 0xC2 gets rendered as Â.

So, at some point, Virgin's billing software is seeing 0xC2 0xA3, encoding it as £, and then grabbing the first character to print on the bills.

Where do the other characters come from?

  • In Code Page 437 - an ancient IBM encoding - the £ symbol is 0x9C.
  • 0x9C in Windows 1252 is œ
  • The String Terminator is 0xC2 0x9C

And the Ÿ character? Not a clue! Inspecting the raw text of the PDF shows the underlying code is: 6m \2343.00 RIV Discount. PDFs escape octal characters. Octal 234 is decimal 156 - which is hex 0x9C.

Nearest I can get is the ISO/IEC 8859-15 encoding, where œ is 0xBD and Ÿ is 0xBE. Perhaps a font substitution error?

Everything is awful

This isn't just ugly. It points to the fact that Virgin don't test their software and don't upgrade their systems. What other horrors lie in their technology stack?

And it isn't just a tech issue. It is bad for screenreaders - meaning visually impaired users get a poor experience.

The year is 2018. And we're still battling text encoding issues due to crappy software.


Share this post on…

  • Mastodon
  • Facebook
  • LinkedIn
  • BlueSky
  • Threads
  • Reddit
  • HackerNews
  • Lobsters
  • WhatsApp
  • Telegram

3 thoughts on “Virgin Media don't understand Unicode”

  1. Alex says:

    I also have concerns with the way Virgin Media operate their account security. The highly restrictive password rules (7-10 chars, must start with a letter, etc) suggests it isn’t a very sophisticated implementation and I would guess not hashed before storage. I’ve raised this by email and twitter on a number of occasions but it has been ignored.

    The lack of testing you’ve identified on their website reinforces my worries.

    Reply
  2. Tom says:

    The year is 2021 and I still just received and email telling me “You’Re Receiving A œ3 Discount” and came and found this post. Good to know my fee’s are being used to keep this telecoms company on top of it’s tech.

    Reply
  3. Dr. Mantis Toboggan says:

    2024 and just recieved the exact same thing! "You're receiving a œ3 discount." Nice!

    Reply

What links here from around this blog?

What are your reckons?

All comments are moderated and may not be published immediately. Your email address will not be published.

Allowed HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <p> <pre> <br> <img src="" alt="" title="" srcset="">