The complainant in any such case shall be answerable for all the actual costs and charges and for the support in prison of any person so committed, to be paid weekly or otherwise as may be ordered by the court or magistrate; and if the charge for his support in prison shall not be so paid, the jailer may on the failure of the complainant discharge such person from his imprisonment.