I did have a problem with being attacked by dogs, especially in rural areas. The last time it happened I searched out dog repellent at a sports store. Turns out it is actually pepper spray and if I carry it around with me it could be considered a concealed weapon. Recently I was advised not to take it with me to Britain as it is illegal there too.
That said, it appears to act as an amulet, as I haven't been attacked by a dog since I started carrying it. Strange but true.