When an individual is cast against type, the results are always interesting. Armando Iannucci has made a reputation as a writer and director of cutting-edge contemporary comedies, from BBC’s “I’m Alan Partridge” to HBO’s “Veep,” and including his Oscar-nominated work as a writer of 2010’s “In the Loop.”

So he may seem an unlikely match for Charles Dickens, but Searchlight’s “The Personal History of David Copperfield” turns out to be a perfect vehicle for him.

“I was re-reading ‘David Copperfield’ about 10 years ago and was struck at how very funny and modern he is,” Iannucci tells Variety about the much-filmed tale. He cast Dev Patel as the title character — again, a piece of casting against type that works very well.

Iannucci and co-writer Simon Blackwell make the work feel up-to-date, not by inserting anachronistic topics or attitudes; the film seems contemporary because it focuses on the characters’ humanity and foibles and because the film is so fast-moving (just under two hours).

Notable Dickens film adaptations include MGM’s 1935 George Cukor-directed “David Copperfield”; David Lean’s versions of “Great Expectations” (1946) and “Oliver Twist” (1948); plus the Carol Reed-helmed film of Lionel Bart’s musical “Oliver!” (1968).

Iannucci appreciates most of the films, but wanted to do something different. “I felt they were mostly reverential about Dickens’ plots and didn’t pay enough attention to his imaginative language, the comedy and the modern sensibilities, so I wanted to emphasize that.”

“I love the David Lean films, they’re wonderfully made, but I think they set the tone” for subsequent Dickens films, he says. “We’ve grown up admiring not Dickens’ work but David Lean’s conception of Dickens: it’s a dark, foggy, claustrophobic view.”

“I wanted to make it bright and colorful and alive, and to engage viewers by saying ‘This book may be 150 years old, but it still talks to you.’ When David is asked to read, he says he can’t: They didn’t have a word for dyslexia, but that’s what he’s talking about.”

Mr. Dick (Hugh Laurie) is usually presented onscreen as a figure of fun. But Iannucci and Laurie wanted to show the man behind the eccentricity. “He’s clearly a bright, empathetic individual who has a mental illness. It’s one of first depictions of mental illness discussed as a mental illness in an English novel.”

They also worked on the title character, to make him less of a passive hero. “In the book,” says Iannucci, “David is the observer and funny things happen all around him. But for a film, he has to be a ball of energy. So we gave Dev a lot of Dickens’ own traits — writing on scraps of paper, and having a dialogue in the mirror. Dickens was a good amateur actor and could mimic people, so we absorbed that for David. As soon as we discovered Dev and Jairaj [Varsani], who plays young David, are both good at doing impressions, we gave them more to do.”

The film has been getting Oscar buzz for the script, performances and below-the-line elements (Christopher Willis’s score, Suzie Harman and Robert Worley’s costumes, Christina Casali’s production design, Zac Nicholson’s cinematography and the editing of Mick Audsley and Peter Lambert).

Iannucci grew up in Glasgow, where he was exposed to diverse entertainment, including the radio production of “A Hitchhiker’s Guide to the Galaxy” which helped him realize “you could do a comedy of ideas, not just gags. I was also a huge fan of Monty Python, Woody Allen and Billy Connelly, and loved the early inventive comedies of Buster Keaton and Charlie Chaplin. Chaplin’s films were all about poverty but funny things happen.”

Iannucci also loved “big” comedies including “Dr. Strangelove” and Terry Gilliam’s “Brazil,” plus novels like Dickens’ “The Old Curiosity Shop.”

He adds, “Those were my inspirations. After I rewatched ‘Time Bandits,’ I realized how much I’ve stolen subconsciously from Terry Gilliam. When you’re impressed by someone’s work, when it’s something you haven’t seen before, it stays with you.”

The new film is likely to stay with people as well.

“I told the cast, ‘Let’s pretend no one ever made a period drama before, so there’s no set of rules on how to make it. Don’t act like you’re in the past; 1840 is your present. It should feel exciting, as people are thinking about the future.”

Referring to his 2017 film “Death of Stalin,” Iannucci says “It was a dark and brutal comedy, so I wanted to do something different and more joyous. I’m glad people feel uplifted when they watch ‘David Copperfield.’ I’ve always found Dickens a very funny writer. People think of him as writing melodramas with fog and child poverty. Which of course he does, but he’s really very funny and modern.”