The jail of the county shall be the jail provided by the county court as required by law. When a county is without a sufficient jail, or its jail is to be removed, rebuilt or repaired, the circuit court, or the judge thereof in vacation, may adopt the jail of another county as its jail until a sufficient jail is obtained by building or repairing. And persons committed, or to be committed, to the jail of the first-mentioned county, at or after such adoption, and before a sufficient jail is so obtained, shall be conveyed to the jail so adopted. The jail of any county in which the Supreme Court of Appeals may sit may be used as a jail for said court.
The county court of each county, or tribunal created in lieu thereof, shall have authority to provide for and pay to any city, town or village in this state in which no county jail or other place of imprisonment is owned by the county, not more than $1.50¢ for the first day and not more than $1 for each subsequent day that any person charged with a criminal offense may be temporarily held in the jail or lockup belonging to such city, town or village: Provided, That the provisions of this paragraph shall not apply to any person imprisoned for a violation of the ordinances of any city, town or village: Provided further, That in no case shall such payment be made for a period of more than five days for the detention of any one person held under any charge or charges at any one time. No such payment shall be made unless the amount of such charge is certified by the justice or other authority under whose jurisdiction such person is detained in the same manner as other costs in criminal cases are now required by law to be certified. The payment provided for in this section shall be made, in cases of persons charged with felonies or misdemeanors, in the manner and from the proper fund, according to the character of the offense charged, as provided by law for the payment of other costs payable by the county courts in criminal cases.