That's a great thing to say but how do you do the enforcement like that? Do you expect the police to just know who's homeless? Take their word for it? Do you have them hand out citations and take it up in court?
I'm going to guess that if you see someone pitching a tent on the sidewalk or sleeping in the doorway of a business, there is a fairly good chance they are homeless. Sleeping in a car doesn't necessarily mean anything, but if it is full of otherwise household items, the chances of the person being homeless goes up.
You can also, you know, ask. Sure, a few folks might lie, but it is better to let them get away with the lie than to punish a bunch of folks with no choice.