From: Rabbi Moshe Sofer
To: Rabbi Itzik (Isaac)
The Chasam Sofer rules that whether a father may use ma'aser kesafim to fulfill his contractual obligation to pay for his son's Torah study depends entirely on his original intent: if he stipulated at the outset that such payments would come from ma'aser, it is permitted (with the best practice of splitting the tithe between the poor and his son's support); if he made no such stipulation, he may not pay this debt from ma'aser, just as one whose grain is seized must still tithe from the remainder. He also rejects the Be'er HaGolah's reconciliation of the Maharil and Maharam, instead proposing that their dispute hinges on whether a prior stipulation was made.
Source: Shu"t Chasam Sofer YD §231