I would not hesitate to do everything possible to kill any dog stupid enough to attack me.
If I'm unable to kill it during the attack, I'd kill it afterwards, or force the owner, using whatever means necessary, to have the dog killed.
In my opinion, dogs are lethal weapons, and should not be allowed to be owned by the general public, and never kept outside adequate fencing-in.