In his nearly 15 months in Moscow’s infamous Lefortovo prison, Evan Gershkovich has plowed through Russian literary classics like “War and Peace,” and played slow-moving chess by mail with his father in the United States. He tries to keep himself in shape during the hourlong exercise period he is permitted each day.

Friends who correspond with him describe Mr. Gershkovich, a Wall Street Journal reporter, as positive, strong and rarely discouraged, despite facing the official wrath of President Vladimir V. Putin’s Russia.

“He may have ups and downs like everyone else, but he remains confident in himself, in his rightness,” said Maria Borzunova, a Russian journalist and a friend of Mr. Gershkovich.

Mr. Gershkovich went on trial Wednesday, facing up to 20 years in prison on an espionage charge that he, his employer and the U.S. State Department vehemently deny.

He appeared in a court in the major industrial city of Yekaterinburg east of Moscow, where he was originally detained and where he was transferred recently after more than a year of imprisonment in Moscow.

Shortly before the proceedings started, journalists filmed Mr. Gershkovich, with his head recently shaved, standing in a glass cage in the courtroom. After several hours, the court scheduled the next session in the case for Aug. 13, according to the Russian state news agency Tass.