וַיָּ֤שֶׂם דָּנִיֵּאל֙ עַל־לִבּ֔וֹ אֲשֶׁ֧ר לֹֽא־יִתְגָּאַ֛ל בְּפַתְבַּ֥ג הַמֶּ֖לֶךְ וּבְיֵ֣ין מִשְׁתָּ֑יו וַיְבַקֵּשׁ֙ מִשַּׂ֣ר הַסָּרִיסִ֔ים אֲשֶׁ֖ר לֹ֥א יִתְגָּאָֽל׃
און דניאל האָט זיך אַרײַנגענומען אין האַרצן, אַז ער זאָל זיך ניט פֿאַראומװערדיקן מיט דעם מלכס שפּײַז, און מיט דעם װײַן װאָס ער טרינקט, און ער האָט געבעטן פֿון דעם הױפּט פֿון די הױפֿדינער, אַז ער זאָל זיך ניט דאַרפֿן פֿאַראומװערדיקן.
Rashi
not to be defiled Heb. לֹא יָתְגָּאַל, an expression of sullying.
Chomat Anakh
And Daniel set upon his heart that he would not defile himself, etc." "A good intention, the Holy One, blessed be He, attaches to the action, and it ascends to be favorable before the Lord.
Ibn Ezra
[Daniel 1:8] Vayasem Daniel al-libbo (וַיָּשֶׂם דָּנִיֵּאל עַל־לִבּוֹ - And Daniel resolved; lit. And Daniel placed upon his heart): The king's pat-bag (פַּת־בַּג) [food/provisions] is forbidden [according to Jewish law], and the wine is also forbidden. And it is stated [regarding the prohibition, particularly of the wine - likely Ibn Ezra's Aramaic paraphrase summarizing the concept]: “[One might say/It implies] to pour it [the wine] as a libation according to their rite for their gods” [alluding to practices like those mentioned in Daniel 5:4].