Sure, it's true you don't know where that money is going. But instead of encouraging people to NOT give money, why don't you encourage them to GIVE something else?
-Give prepackaged food that is sealed so the person knows you didn't poison it or stick needles in it or whatever.
-Take the person out for a meal. A co-worker of mine did this for a man he met on the train. Granted, you should judge the individual circumstances, but it's a possibility.
-If you feel awkward taking a homeless person out for a meal, buy a take-out meal from a restaurant nearby.
-Give gift cards for restaurants or grocery stores near where that person is generally located. If you're worried about the person buying alcohol, you can pick an establishment that doesn't serve it, such as a fast-food restaurant.
-Volunteer to serve homeless dinners at local shelters and outreach programs.
-Give something else, like clothes, sanitary products, camping gear, a gift card to a clothing store, etc.
-Give a bus pass.
-Give medicine (over-the-counter) and first aid products.
Etc. Use your imagination.
And honestly, not every homeless person squanders their alms on liquor and drugs. Use the Spirit to let you know what to give.