The fact that money is coming from the government (public funds) doesn't seem to make it less of a charity. The Gemora Bava Basra 10b says:
אִיפְרָא הוֹרְמִיז אִימֵּיהּ דְּשַׁבּוּר מַלְכָּא שַׁדַּרָה אַרְבַּע מְאָה דִּינָרֵי לְקַמֵּיהּ דְּרַבִּי אַמֵּי וְלָא קַבְּלִינְהוּ שַׁדַּרְ[תִּ]ינְהוּ קַמֵּיהּ דְּרָבָא וְקַבְּלִינְהוּ מִשּׁוּם
שְׁלוֹם מַלְכוּת שְׁמַע רַבִּי אַמֵּי אִיקְּפַד אֲמַר לֵית לֵיהּ בִּיבֹשׁ קְצִירָהּ תִּשָּׁבַרְנָה נָשִׁים בָּאוֹת מְאִירוֹת אוֹתָהּ וְרָבָא מִשּׁוּם שְׁלוֹם מַלְכוּת
Ifera Hurmiz, the mother of King Shapur sent four hundred dinars to Rabbi Ami, but he did not accept them. She then sent them to Rava, and he accepted them for the sake of peace with the government . Rabbi Ami heard what Rava had done and was upset. He said: the The posuk : “When the boughs are withered, they shall be broken off; the women shall come and set them on fire” (So why) did Rava accept the money? (The Gemara answers:) He did so for the sake of peace with the kingdom.
The Gemora goes on to say that even Rava who accepted the money for the sake of Shalom Malchhus gave it to non-Jewish recipients.
It is safe to assume that Ifera Hurmiz was sending public money. Not money she privately earned on her own.
On another note I know people on government programs who would not accept Edus by a Chasuna and I know people who would not give it to them because it so difficult to be 100% straight with the government that they feel anyone on programs is not kosher for edus due to psul gazlan