Regulations Governing the Detention of the Aliens Article 3

Upon entering a detention center, each detainee shall have a body security inspection, and have his/her fingerprint pressed and photograph taken by detention center officers. If the detainee is a woman, the inspection shall be conducted by female officers.Male detainees shall be separated from female detainees in detention centers. If a detainee is found to be a transgender, he/she will be detained separately in a solitary room in detention center (according to the gender showing on his/her identification certificate).
中文原文 外國人收容管理規則第3條
受收容人入所時,應接受收容處所執行身體安全檢查,並按捺指紋識別及照相。
受收容人為女性者,檢查身體應由女性人員為之。
收容處所應將受收容人以男女區隔方式收容之;收容處所發現性別變更之受收容人,得依其證件所示性別,個別收容於獨居房間。

English translation for reference only; the Chinese text prevails. Not legal advice.