EastEnders character Syed Masood had a homosexual affair last year
The BBC has commissioned a wide-ranging investigation into how lesbian, gay and bisexual people are portrayed on TV, radio and online.
The research will ask a variety of people across the country what they think about subjects such as jokes, dramatic storylines and stereotyping.
The BBC's Tim Davie said it was "vital" for the corporation to reflect the "diverse communities" across the UK.
He added that the findings would "deepen our understanding" of viewers.
The three-part study will include audience research, an online survey and a consultation with lesbian, gay and bisexual community groups across the UK.
It is understood the BBC will also approach people who hold homophobic opinions.
"We'll ask people their views on language, tone, stereotyping, on-screen talent, humour and scheduling to name just a few areas," said Davie, who is chairman of the BBC's working group on the portrayal of lesbian, gay and bisexual people.
"This is the most comprehensive piece of research ever carried out in this area by the BBC and we're doing it because, as a public service broadcaster, we have a responsibility to serve all of our audiences.
"It's vital that we reflect the differences among all of the UK's diverse communities, nations and regions."
A report summarising the findings will be published in summer 2010 and the BBC plans to share its research across the broadcasting industry.
It will not alter editorial guidelines, but programme makers will be able to consult the research when making decisions about their work.
"If the research doesn't challenge then it will have failed," Davie said.
Homosexuality has been portrayed in several dramatic storylines across the BBC in recent years. EastEnders character Syed Masood married a woman despite admitting he was gay and having a brief homosexual affair.
The Archers also featured a gay wedding in 2006.
But other output has caused controversy. Jonathan Ross drew scores of complaints last year after suggesting that parents should put their sons up for adoption if they wanted a pink Hannah Montana MP3 player.
Broadcasting watchdog Ofcom later found he had not breached its guidelines because the comments were clearly made in jest.
However, it did rule against Radio One breakfast show host Chris Moyles, who used a high-pitched, effeminate voice to parody pop star Will Young, who is openly gay.
Ofcom said the sketch appeared to condone "negative stereotypes based on sexual orientation".
The BBC's new research project follows similar research into the corporation's portrayal of disabilities.