Something to consider- a cheery response to unsolicited attention only reinforces the idea that women should feel complimented at being selected for sexual advances. This just keeps the advances coming. Some of these men need a clue about how it's not necessarily a compliment to have someone say, 'Hey, you look like the sort of woman who'd go home with random strangers and play scrabble' in lieu of saying 'Nice weather we're having.'
This entirely. It can be done in a complimentary way, of course, but saying to a complete stranger anything which is essentially, "hey, I like how you look, so let's go bump uglies" is not a compliment. This doesn't require further explanation; it should be painfully obvious.
I travel several hours every day, to and from work on the train. On the way back, especially in the Winter when it's dark, I can't ever fully relax or immerse myself fully into a book. I choose seats which are easy to run from and in which I can't be blocked if someone sits in the aisle next to me. And there are certain people to whom any response is an encouragement, like a small child who serially misbehaves because the subsequent negative attention is still a form of the attention they want, even if it's not ideal. If any stranger approaches me on the train while I am obviously busy with a book or somesuch, it limits their possible intentions to only a few things, which puts me on guard. It is difficult to deal with such people, and usually by how they approach you, you can tell which people aren't going to listen to what you say and will start harassing you. The trains are dangerous at night, and although the police patrol them frequently, it sometimes isn't frequent enough.
I have three tactics: the first is to nod and, without smiling or looking inviting at all, say 'uh-huh' vaguely as I half raise my eyes to them before going back to my book. This is all done in a distracted and smooth motion, not jerkily or nervously. This is enough to tell most decent people that I'm busy (as I obviously was before they interrupted me) and am not interested in a conversation. Anything else they say is met with smaller and smaller versions of the same response.
The second tactic is with my phone--I'll slide my hand into my pocket as discreetly as I can, and press the right buttons to make it sound like it's ringing (I've memorised the right buttons to set off a function I installed without having to look at what I'm doing). I then answer it and have a mock conversation about how I'll be getting off soon and I'll see Bruno and all his burly weight-lifting and kick-boxing friends who are waiting there to meet me. Sometimes, if the person keeps trying to interrupt me, I'll actually get off at the next stop (they never follow), but get on again in the next carriage or just catch the next train.
The first and second tactics get rid of almost everyone (~99%). Anyone remaining at this point is very determined and clearly does not care about what I want. So, the third tactic is to make myself unappealing. I start doing anything gross. I really mean gross. Most creeps will stop seeing you as whatever unsavoury thing they've been thinking of when you start picking your nose, or clearing your sinuses, or cleaning your ears and examining the results... You get the picture. Turns most people away very quickly.
Only once, out of many many incidents, has anyone persisted past this point. I literally ran to the conductor (the nearest staff) two carriages away, and based on the things the guy was shouting as I sprinted, I'm glad I escaped when I did.
Where I live, police don't always answer when you call. So I need to resort to these things in order to get to work. If it's better where you are, either just call them, or if it hasn't escalated into anything and you're just apprehensive at whatever point, call a friend (pre-arranged) and pretend it's the police. The friend can call the real police if they hear things actually start to get nasty. But don't underestimate the potential danger such people pose. Someone who honestly thinks a woman should be complimented when she is told that which was mentioned above isn't thinking from her point of view, and is more likely than most other people to therefore lack the empathy needed to not do things which make the situation unsafe for her.