Something else is at work.
As you said. Almost all women you worked with were foreign born. My experience in CS at university is the same. Almost all women are exchange students from asia.
My university provides a program almost identical to CS, called IT, with some differences:
1: It has an optional management/economy spin to it in years 4 and 5
2: It gives you an engineering title rather than just a CS bachelor/master degree
The curriculum is otherwise nearly identical. IT has slightly more focus on hardware.
What's the twist? Almost all the non-exchange student girls are in IT and not in CS.
In short: There has to be something in CS that repulses women, but which is not a factor for exchange students.