The main character (male) whom I remember being American or British gets sent to prison in a foreign country and is psychologically and/or physically tortured into signing a confession. The one plot point that really stood out when I saw the film originally was that the prison warden or guard that was trying to extract the confession finally let the main character eat real food and shower, shave, get clean clothes etc. only to force him to put back on the dirty clothes and send him back to his cell, which made him sign the confession. Originally I thought is was Midnight Express, but I just re-watched it and while somewhat similar, it was not the film I am trying to find and was made in the 70’s, which I think is too far back.
Killer: A Journal of Murder (1995)?