The trouble with television is that, sometimes, it spoils the pictures inside your head. You notice this first, of course, as a child. In 1977, when I was eight, the BBC adapted The Peppermint Pig by Nina Bawden, a book I loved. Disaster! No one looked like I wanted them to, and yet when I went back to the novel, the images I had conjured myself were distorted, as fuzzy as a fading dream. One of my characters would suddenly begin talking to one of theirs; one of their rooms would morph into one of mine, and over the course of a single paragraph, too. The only constant, porkers being what they are, was the pig. So I learned to avoid adaptations of favourite books until, in 1981, ITV screened Brideshead Revisited, a temptation I couldn't resist. Lucky, then, that it was so very good. When, even now, I read the passage in which Julia Flyte realises that her love for Charles Ryder is impossible, and I still see only Diana Quick sitting on a stone step, tears ploshing towards her beautiful upper lip, I can't say that I mind one bit.
When to resist, and when to give in? Readers of Henning Mankell have a particular problem on their hands in this regard. The BBC recently finished screening a second series of Wallander, based on the Swedish crime writer's novels about a lonely, very angry detective called Kurt Wallander, and a third has been commissioned. These films star the Oscar-nominated Kenneth Branagh as Wallander and are filmed on location in Ystad, the small town near Malmö where the character lives and works, and everyone seems to like them: critics, award committees (Wallander has won five Baftas), even Mankell. But still, there are some fans out there - I had dinner with one last night - who have so far resisted the temptation to tune in. These readers fear finding their hero . . . what? Too blonde? Too polite? Insufficiently crumpled? All of these things, and the rest. "He cries a lot, this Wallander," I said to my friend over supper. She wrinkled her nose. "Wallander doesn't want to cry," she said. "He's against that."
The dilemma - to watch, or not to watch - is exacerbated by the existence of a Swedish television Wallander, which has been shown on BBC4. Actually, by the existence of two Swedish television Wallanders. Between 1995 and 2007, the nine Wallander novels were made into films starring Rolf Lassgård, an actor best known here for his role in After the Wedding (the Oscar-nominated drama directed by Susanne Bier). And between 2005 and 2009, two dozen more films were made, this time starring Krister Henriksson as Wallander.
The films starring Henriksson, shot as two series, are not based on Mankell's novels; these are original stories, based on plots written specifically for television by the author. In Sweden, reaction to them has been mixed: the first and last films in each series are made for cinema release, and thus usually better than the soggier middle episodes. For Mankell, however, the actors inhabit his characters powerfully well. When Johanna Sällström, who played Linda, Wallander's daughter, committed suicide in 2007 - she had been suffering from a depression following the 2004 Indian Ocean tsunami, which she and her daughter survived by clinging to a tree - Mankell abandoned a planned trilogy of novels based around the character after only one book; his grief and guilt were, he insisted, too great. It is the first Henriksson series that has been aired in the UK.
I like the Wallander novels an awful lot but, right from the beginning, I decided that I would watch the TV versions, too; however much I enjoy a detective story, the nature of the beast is that I'm unlikely to read it again. Still, this is a strange business. Which of these two - Branagh, or Henriksson - is my Wallander? Oh, it's difficult. Generally, I like Branagh, and there is no doubting that the BBC has gone to town with its Wallander; from the moment the sunflower yellow title sequence begins to roll, you know you are watching Top-Class Television.
But sometimes, Top-Class is not quite what is required. Read Mankell, and the most striking thing about the books is how straightforward, how pared down they are, even by the standards of the police procedural. I've no idea whether Dashiell Hammett is among his influences, but Mankell's prose is every bit as spare, and its motor, like Hammett's, is - to borrow from the historian of the detective novel Julian Symons - a kind of "wistful cynicism". Wallander is hard and stoic, but this toughness is lookout guy for a longing - for a drink, for his ex-wife, for some kind of peace - that leaves him existentially worn out.
Branagh, to be sure, looks worn out. But he tries too hard. You can see him acting. He's the king of the show, whereas Mankell's Wallander - like Henriksson's - would far rather fade into the background. And Branagh is still handsome, for all that in Wallander he gamely sports a paunch. Henriksson, on the other hand, really isn't, which somehow captures his creator's pitilessness, because in the novels, Mankell won't give Wallander a break; it's almost as if he wants to humiliate him: "He ate a hamburger special. He ate it so fast that it gave him diarrhoea. As he sat on the toilet, he noticed that he ought to change his underwear . . . " Henriksson, with his loose skin and his bloodhound eyes, looks humiliated; Branagh looks agonised, which is quite different.
Admittedly, there is snobbery at play here. The experience of watching Wallander in Swedish, with subtitles, subtly flatters the viewer. (Which of us doesn't read subtitles, and feel his brain swell?) And the Swedes allow their Wallander to listen to opera, as he does in the books; the BBC ditched this, fearing it would make him too much like Morse. But I would rather hear Swedish than listen to Branagh and his colleagues talking in flat voices, as if they were reading a poor translation, and I like the way this Sweden looks and feels. The small-town mentality is essential to Mankell's Wallander, but the BBC insists on making the police station a shouty hive; in the Swedish version, its offices are more like sleepy cupboards. Branagh's Wallander is often to be seen clutching an expensive paper cup of coffee. In the Swedish series, the detectives must use the world's creakiest machine, and they drink from pathetic plastic thimbles.
On the other hand, Ystad, however small, is not a town in aspic. Even though Mankell lived in Africa when he began writing Wallander, and still spends half his year there, he doesn't have an exile's feeling for the country of his birth. He doesn't romanticise it. Mankell thinks the writing is on the wall, that Sweden's democracy is as beset with problems as any other. He is appalled by its growing racism and greed, by the low salaries of public-sector employees. He only created Wallander in the first place as a way in to writing about xenophobia (the first novel, Faceless Killers, involves a fire at a refugee centre and the murder of a Somali immigrant).
Upsetting murders apart, the BBC's Ystad is a place where its audience might fantasise about having a holiday home. The streets are pristine. Desirable Gustavian furniture abounds. There is something swept clean about it, for sure; but only rarely do you get to see where the rubbish is left to rot. In the Swedish version, however, there is a sense - albeit subtle - of loss, of change, of the world closing in. Once people left their back doors open; now a light in an empty farmhouse is only cause for alarm. All are suspicious, no one is safe. Wallander goes to investigate a murder, and it is his childhood sweetheart whose body he must watch the pathologist examining.
This is a Sweden where soldiers - the same soldiers who will shortly travel abroad on peacekeeping missions - rampage like thugs during their annual exercises, where traumatised immigrants have no option but to seek their own revenge on those who have abused them, where gypsies are sexually abused by those charged with their care and are forced to live in freezing cold caravans on the edge of town.
Pretty quickly, you stop being taken in by appearances. "Do you want to have a life, or just burrow in, like a mole?" says Wallander to Linda when she tells him that she, too, wants to be a detective. He is referring to his workload, but there's something else going on here, too. Poor Kurt. Now he's down there, he can't imagine ever seeing light at the end of the tunnel.
Rachel Cooke is the New Statesman's TV critic.
A DVD edition of series one and two of the BBC "Wallander" is released on 8 February (£39.99)