Proverbs 17:5

3 A crucible for silver and a furnace for gold, but the LORD is the tester of hearts.

4 A wicked man listens to evil lips; a liar gives ear to a destructive tongue.

He who mocks the poor insults their Maker; whoever gloats over calamity will not go unpunished.

6 Grandchildren are the crown of the aged, and the glory of a son is his father.

7 Eloquent words are unfit for a fool; how much worse are lying lips to a ruler!

Do read the surrounding verses too, because the context often says more than a single verse.

Compare

BSB
He who mocks the poor insults their Maker; whoever gloats over calamity will not go unpunished.
KJV
Whoso mocketh the poor reproacheth his Maker: and he that is glad at calamities shall not be unpunished.
WEB
Whoever mocks the poor reproaches his Maker. He who is glad at calamity shall not be unpunished.
ASV
Whoso mocketh the poor reproacheth his Maker; [And] he that is glad at calamity shall not be unpunished.
DARBY
Whoso mocketh a poor [man] reproacheth his Maker; he that is glad at calamity shall not be held innocent.
BLB
One mocking the poor scorns his Maker; one glad at calamity will not be acquitted.
ÅB
Den som spotter den fattige, håner hans skaper; den som gleder seg over ulykke, skal ikke bli ustraffet.
OTB
Den som spotter den fattige, håner hans Skaper; den som gleder seg over ulykke, vil ikke gå ustraffet.
B1930
Den som spotter den fattige, håner hans skaper; den som gleder sig over ulykke, skal ikke bli ustraffet.

Study notes (Tyndale)

Original text and word study

Cross references