When Enid Blyton created the Malory Towers stories, her cast of schoolgirl characters included a tomboy called Bill.

A new stage musical based on the boarding school adventures will suggest that there was more to Bill's expression of gender identity than the books could say.

Emma Rice, the former director of Shakespeare’s Globe who has adapted Malory Towers for the stage, has cast a non-binary actor, Vinnie Heaven, in the role and said that Bill - full name Wilhelmina, and described in the books as looking “exactly like a boy” - may have been transgender or gay but unable to express that in the 1940s.

“Bill is portrayed as a tomboy in the books but, thanks to the progress we have made as a society, people like Bill are now able to express their identity in other ways,” Rice said.

“It’s very moving to look back and see people who may have been transgender or gay or a member of another community at a time when there simply wasn’t the language to talk about it.”

Rice has also cast non-white actors in some roles “to more accurately reflect the times we live in” but has otherwise stuck closely to the stories, with their midnight feasts and jolly japes. The post-war 1940s setting remains.