The prison records for Scotland are available in the National Archives of Scotland. Are there alternative online sources for some of these? (I'm in Australia, so tripping to Edinburgh isn't an option any time soon.) I'm specifically interested in the Prison of Stranraer around 1850.
The context is that my great-great-granduncle, James McIntyre, was listed as a prisoner there in the 1851 Scotland Census, aged 22. It's definitely him: there were no other James McIntyres born in Kirkcolm around the same time as he was. The juicy element of this is that he grew up to be a highly successful sea captain in Australia, and with his brother Andrew, owned several ships. Neither he nor Andrew ever married, and their wealth passed to their nieces, including my great-grandmother. As a result, the family was quite well-off in that generation.
So I'm dying to know what he was in prison for, and how he turned his life around after that. It might explain why they came to Australia in the first place.