For someone I knew well, then I tend to know what they / their family are like; for people like work or charity colleagues I try to check with someone (without bothering close family members)
I too think trousers quite acceptable - having worked & been friendly for years with south Asians, I have adapted the "shalwar kameez" look for weddings & funerals. I have silk trousers, tunics & scarves in a variety of colours. Comfortable & beautiful.
My mother made her own clothes and loved bright colours, so we asked everyone at her funeral to dress in their bright clothes.
However, at my father's funeral, his grown-up GDs all said they would wear glamourous black clothes - and very stunning they looked.
A friend of mine went to a funeral where all the women were asked to wear red stockings - and given the money to buy them!!!!!
One of my sons' friends died in his early 20s - we were instructed to "come dressed as you would to spend time with him" so we turned up in surfing gear, mountain walking clothes, even full am-dram & circus costumes.