Unraveling the Secret Code Behind HBO/BBC Drama 'Gentleman Jack'

How the passion project of 'Happy Valley' creator Sally Wainwright — starring Suranne Jones in the lead — lay hidden behind the walls of a British country hall for more than 100 years.

There can’t be too many scriptwriters forced to decipher a code in order to put a story on a page, but then there aren’t many stories quite like those at the heart of HBO’s new drama with the BBC, Gentleman Jack.

From Sally Wainwright, the acclaimed British writer of shows such as Happy Valley and Last Tango in Halifax, the eight-part series centers on Anne Lister, an extraordinary 19th century scholar, traveler, businesswoman and property owner based in the north of England.

But her diaries — some 5.5 million words across 7,500 pages, a sixth of which were written in a code Lister devised herself — revealed her to be something else as well, something that explains why she’s only become famous in recent years. Not only was Lister a lesbian when the word didn’t even exist, but she had what is now considered to be the U.K.’s first lesbian marriage, some 200 years before it was made legal.

“She was a secret,” explains Wainwright, who grew up near Lister’s now famed estate of Shibden Hall in Halifax, Yorkshire, a 500-year-old property where — adding an inspired touch of authenticity — almost all of Gentleman Jack was shot. But Wainwright only became aware of this inspirational figure in the 1980s. “People didn’t talk about her, and for obvious reasons. But times have changed. We can now be very open about a woman who married another woman. Even 30 years ago you couldn’t.”

Wainwright actually pitched the idea of a drama back in the early 2000s, long before she started accumulating BAFTA awards for her scriptwriting, but the subject matter fell flat with TV commissioners.

“I actually think I’d heard [Wainwright] talk about it years ago,” claims Suranne Jones, who plays Lister, joining Wainwright for their third collaboration after TV crime dramas Unforgiven (2009) and Scott & Bailey (2011-2016).

But even as the commissions and acclaim amassed, the idea of doing something on Anne Lister never went away, and after the success of Happy Valley — which became a hit stateside when it was shown on Netflix — the BBC’s director of content Charlotte Moore discussed with Wainwright what she’d like to do next (“the first time somebody that high up has asked me that”).

When asked which of the five ideas she pitched she’d prefer to do first, there was only one answer.

“Everything else I’ve written has been a rehearsal for this,” she says.

The lengthy wait it took for Gentleman Jack to get the green light actually proved beneficial. Not only did it allow for attitudes around homosexuality on screen to change, but it gave Wainwright enough time to read and decipher Lister’s diaries.

“Because it’s a minefield — it’s a labyrinth,” she says.

Derived from a combination of algebra, Ancient Greek, zodiac, punctuation, mathematical symbols and with absolutely zero gaps, the diaries detailed Lister’s lesbian identity and affairs, while also describing the events of the time. Initially hidden in the walls of Shibden Hall, they were found by its last inhabitant John Lister in the late 1800s. But on deciphering the code and discovering its then-shocking contents, he was advised by a friend to burn the pages. He didn’t, instead returning them behind the wall, where they were discovered in the 1930s, decoded and hidden away once again. It wasn’t until 1988 that the first batch of diary entries was published (their graphic nature led many to think they were a hoax), with several more volumes coming out since then.

But given the prolific nature of Lister’s diary-writing, much was still left un-decoded, leaving Wainwright with plenty of new material to include in Gentleman Jack, which chronicles just 18 months (and there's plenty more for further seasons).

“It’s actually quite simple — once you get it it’s not that hard,” she says of the code. Much is basic substitution with letters replaced by numbers, symbols and, in some cases, different letters (B is C, K is L, for example). “It’s just practice. I’ve been doing it for 20 years and I’m really fluent.”