A woman appeared in court in her pyjamas while a prisoner turned up in his underwear, an official report has found.

HM Inspectorate of Prisons for Scotland (HMIPS) described the incidents at Edinburgh Sheriff Court as unacceptable.

The Court Custody Unit (CCU) holds prisoners arrested by the police who have yet to appear before the sheriff.

It was also found two prisoners turned up in shorts while another had no footwear.

HMIPS said: "When observing prisoners being removed from escort vans it was noted that one female prisoner arrived in her nightclothes, two prisoners were in shorts, one prisoner appeared to be in his underwear and one prisoner had no footwear.

"Police Scotland should ensure that those arriving from police custody are appropriately dressed for the journey and their subsequent court appearance.

"It is unacceptable that individuals are expected to appear in a court of law in their underwear or nightclothes."

It was also reported that a CCTV camera was positioned allowing the operator to view prisoners when they were using the toilet.

The camera was ordered to be moved and the report said this had been done.

The custody unit was found to be noisy but staff maintained good levels of supervision and were "highly visible and approachable".

It said: "Staff were observed undertaking appropriate levels of supervision whilst taking account of the varied needs of those they were responsible for.

"One individual that had arrived in a highly vulnerable state was located near the main desk and staff engaged with him on a regular basis to ensure that he felt safe and supported."

Chief superintendent Garry McEwan said: "Police Scotland ensure that all those in police custody are treated with dignity and respect.

"Alternative footwear and clothing is stocked in all primary suites and, where practical, is offered.

"All relevant health information is recorded as part of the Personal Escort Record which remains with the prisoner when they are transferred in the custody of G4S."