Originally from ticket #206.
Scottish Charity numbers are registered with the Scottish Charity Commission: https://www.oscr.org.uk/
Northern Ireland Charities are included in the Deemed List: http://www.charitycommissionni.org.uk/Our_regulatory_activity/List_of_deemed_charities.aspx
I'm currently working with a dataset from Big Lottery Fund that includes Scottish and Northern Ireland charities.
Prefixes such as
GB-SC for Scottish Charity Register
and GB-NICH - for Northern Ireland Charities Commission Deemed List
would be useful.