Using Google Ngrams to figure out Gaddafi's correct spelling.
ecogito.net
ecogito.net
ق (Qof) is often transliterated as Q, but it's pronunciation varies widely in the Arabic speaking world. In Egypt, depending on the context, it's either a K sound or a glottal stop, and in Gulf Arabic, it's similar to the English hard J sound. In Libyan it's often closer to a G (thus the G in Gaddafi).
ذ (Dhal) is the voiced dental fricative: like the TH sound in 'the', 'weather', or 'loathe' (but not thin, with, or within). Arabic also has an unvoiced version of the same consonant (ث), so ذ is sometimes transliterated as dh (d is the voiced version of t).
866,000 Google hits for: '"gaddafi" site:de'
9,090 Google hits for: '"qaddafi" site:de' (and nearly all of them are English articles)
One the reasons books may be a better way to verify the consensus on spelling (instead of say, checking how many results you get for a certain spelling on the entire web) is because books are more likely to be well-researched. (In my second example, the misspelling 'Ghandi' returns millions of results on Google, while it's almost non-existent in books)
معمر القذافي
"Qaddafi" is only "correct" in the sense that it is the most common Latin alphabet spelling...
According to the Irish times, there are a total of 112 different English spellings of the name. Transliteration from Arabic to English is always tricky, it seems.
$name =~ m/M[ou]'?amm?ar ([aAEe]l[- ])?(Q|[GK]h?)a(d|dd|dh|dhdh|th|zz)afi/