To analyze the difference between homonym in Japanese, we could easily analyze them based on the kanji they used. Usually, they will have different kanji.
In 辞典, the kanji used is 辞 which means terms/expressions. This is the word for the standard language dictionary such as the Japanese – English dictionary.
In 字典, the kanji used is 字 which means characters. It also refers to 漢字 (kanji). Therefore it means a dictionary which holds in-depth information about Japanese characters.
While in 事典, the kanji used is 事 which means things/facts. It’s a book that holds information about facts. In another language, this is a word for an encyclopedia.
Hope it helps! ｡ﾟ✶ฺ.ヽ(*´∀`*)ﾉ.✶ฺﾟ｡