Every word has its own history. Over is Germanic and Latin mix. It combines the Germanic word *ove* with the Latin word *super.* Oven is entirely Germanic. The original Old English word is *ofen*. So, these words were spelled differently—ov and of. So that explains why they have different sounds. The spelling of the words changed to what they are now, but might have stayed closer to their original pronunciations.
Latest Answers