What is the derivation of "what the dickens"? It features in the Merry Wives of Windsor "I cannot tell what the dickens his name is." So the meaning doesn't seem to have changed ie synonymous with "what on earth".
I think this is an interesting reference regarding the expression: what the dickens?:
ONE explanation is that it is a euphemism for the Devil or Old Nick. This certainly fits with: 'I cannot tell what the dickens his name is' (Merry Wives of Windsor III, ii). Another explanation is that it relates to one Dickins or Dickson, a maker of wooden bowls, who appears to have had a penchant for losing money, for example: 'I was constrained to take half the money they cost mee, gaining by them as Dickins did by his dishes. Who buying them five for twopence solde six for a peny.' (1579, R Galis). Alternatively, Middleton (1599): 'No more is to be got by that than William Dickins got by his wooden dishes'. There are numerous other similar references. Anyway, it lets Charles off the hook.