(Psi)SeveredHead
Adventurer
Although he does lose the use of any spell requiring a material component. And with a genre-savvy jailor, he's likely to be denied the use of verbal and somatic components, and probably line of sight too - cuffs, gags and blindfolds are cheap and readily available.
My own experiences with being a wizard in prison were ... limited.
It was a 1st-level Eberron campaign. The jailers weren't evil. They took my spellbook and components, but didn't bind and gag me. Also, the other PCs were in there with me, and just like I'd free them, they'd have freed me.
I had Color Spray prepared. But I needed three pigments. I told the other PCs, and we scrounged enough for one casting. And then we used it. Naturally as a 1st-level wizard I wasn't going to Dimension Door out of the prison, but we had a rogue who used a sliver of wooden bowl or something to make some Disable Device checks to get us out. And then I dropped the first guard with Color Spray...
I vaguely recall some rather frantic tower climbing (we were at the top of a tower, and fighting past all those guards was a really bad idea).