Steven Spielberg and Tom Hanks serve up a heaping helping of Capracorn in “The Terminal,” and in their hands it turns out to be a reasonably palatable, though hardly gourmet, dish. The picture’s plot is a very simple one, pitting a lovable everyman against a stern bureaucracy and its mot rigid representative. Hanks plays Viktor Navorski, a hapless traveler from the fictional eastern European country of Krakozhia, who’s trapped by red tape in the international terminal at JFK airport in New York when a military coup in his homeland renders his passport and visa invalid, making it impossible for him either to fly back to Europe or to enter the city legally. He therefore becomes an unwilling resident of the facility, much to the consternation of by-the-book security chief Frank Dixon (Stanley Tucci), who’s under scrutiny for a promotion and wants to be perceived as running a tidy operation. While learning to scrounge an existence from his surroundings (and some English in the process), Viktor gradually forges a bond with a trio of airport workers–food delivery man Enrique Cruz (Diego Luna), janitor Gupta Rajan (Kumar Pallana) and maintenance man Mulroy (Chi McBride)–and strikes up a halting romance with stewardess Amelia Warren (Catherine Zeta-Jones), who’s trapped in a dead-end relationship with a married man (Michael Nouri). Will she dump the cad for Viktor? Will the strife in Krakozhia settle down and allow Viktor to go home? And, most importantly, will Viktor’s duel of wits with the officious Dixon finally win him entrance to New York City, where he has a mysterious mission to fulfill–something involving the contents of a Planters Peanuts can that he guards so closely?

Spielberg and Hanks have as little trouble getting the audience to identify with the lovable foreigner Navorski as Capra and Stewart did in securing their sympathy for the idealistic Mr. Smith. That’s not an inconsiderable achievement in the age of terrorism, when the idea of people slipping around security at airports, especially when they’re carrying packages with unknown contents, might well turn people off. But though very loosely based on the story of an Iranian who’s been ensconced for years at Paris’ De Gaulle airport, “The Terminal” is clearly just a feel-good fantasy that has less in common with any actual case than with “Charley on the MTA,” the Kingston Trio hit from the 1950s about the guy who got stuck riding forever on the Boston subway because he didn’t have the necessary change for a transfer to another train (“Did he ever return, no he never returned, and his fate is still unlearned–he may ride forever ’neath the streets of Boston, he’s the man who never returned”). The writers (Sacha Gervasi and Jeff Nathanson, working from a story by Andrew Niccol and Gervasi) are fairly proficient in coming up with tangents to fill in the rather threadbare narrative–Viktor’s assistance to Enrique in courting security attendant Torres (Zoe Saldana), his intervention in an incident involving a Russian man trying to export some drugs, a romantic dinner for Viktor and Amelia hosted by Navorski’s three airport chums. None of these episodes, nor the others scattered throughout the picture, are anything more than manipulative fluff, but they’re pulled off with the expertise one expects from this director and star. Far less successful, unfortunately, are the resolutions that fill the final reel, not merely the outcome of the Viktor-Amelia match-up and the action of security guard Thurman (Barry Shabaka Henley) when Viktor aims to leave the terminal, but especially the revelation of what’s inside that peanut can and why Viktor is so intent on protecting it. In the latter case the treacle level grows dangerously high.

Still, as with Capra’s better pictures, one can forgive that obvious manipulation if view of the skill with which it’s packaged. “The Terminal” has been beautifully put together, with a first-rate production down the line, from Janusz Kaminski’s elegantly straightforward cinematography and Alex MacDowell’s similarly effective production design to John Williams’ dependably supportive score. Hanks, as usual, wins over viewers effortlessly, laying on the gentle humor and poignancy with equal aplomb. Unhappily Zeta-Jones is stuck in a thankless part that offers her few opportunities, and Tucci can’t do much with the one-note martinet Dixon, though he does purse his lips and simmer with rage effectively enough. Among the jovial sidekicks Viktor accumulates during his stay, McBride and Luna are agreeable, but it’s Pallana who proves the real scene-stealer with his comic dyspepsia, although his final act of self-sacrifice is definitely part of the film’s last-act problems; still, he certainly gets the movie’s biggest laughs with his oddball appearance in the Viktor-Amelia dinner scene.

“The Terminal” is just a divertissement for Spielberg, but though even he can’t hide the calculation that drives the picture, he’s adept enough to make you enjoy being taken for the ride. Certainly he could have come up with a better title, though. How about “Mr. Novarski Goes to New York”?