One ought not to encourage beggars, and yes, you are right, it is far better to donate to charities that address the causes of poverty rather than to him, a creature who is merely its symptom.