มาตรา ๒๓ ผู้ใดกระทำความผิดซึ่งมีโทษจำคุก และในคดีนั้นศาลจะลงโทษจำคุกไม่เกินสามเดือน ถ้าไม่ปรากฏว่าผู้นั้นได้รับโทษจำคุกมาก่อน หรือปรากฏว่าได้รับโทษจำคุกมาก่อน แต่เป็นโทษสำหรับความผิดที่ได้กระทำโดยประมาท หรือความผิดลหุโทษ ศาลจะพิพากษาให้ลงโทษกักขังไม่เกินสามเดือนแทนโทษจำคุกนั้นก็ได้
Unofficial Translation
Section 23. In the case where any person commits an offense punishable by imprisonment and in such case the court will impose imprisonment for a term not exceeding three months, if it does not appear that such person has previously been punished with imprisonment or it appears that such person has previously been punished with imprisonment for an offense committed through negligence or a petty offense, the court may render a judgment imposing detention for a term not exceeding three months instead of such imprisonment.