I’m glad someone else pointed out that porcupines don’t attack - most critters with a face full of quills probably jammed said face into the porcupine.
Some dogs learn and avoid porcupines after a quilling, some seem to develop a vendetta against them. I’ve had a couple of incidents and it’s usually expensive. Judging by my dogs’ reaction to pulling them out, it’s pretty painful, so unless there were just a few and they were easy to get to, instead of in their mouth and gums and up and down their chest and legs, it’s a vet visit to be anaesthetized.
I saw an African porcupine at a petting zoo. Quills as thick as a pencil and the size of knitting needles… much bigger than Canadian porcupines.
Not exactly - as noted above, porcupines will swing their quill-covered tails at an enemy, with considerable force. The face full of quills thing is likely the result of being wacked with the tail, not an animal deliberately jamming its face into the quills.
From my experience removing the quills, it’s both. When dogs stick their noses on a porcupine, some (most) of them will just run away, but some dogs enter a murderous frenzy and foolishly attack the porcupines. The dogs I saw with hundreds and hundreds of quills on them also had quills in their mouth, sometimes as deep as the throat. They also frequently had quills on their hind legs, which they probably got when the porcupine tried to defend itself.