It’s debatable whether the name Ernest, used punningly by Wilde in his most famous play The Importance of Being Earnest, was chosen as a late Victorian code word for “gay”.
For instance, the Wildean academic, John Stokes, suggests here this may be true “since the word ‘Earnest’ bears a euphonious relation to the [gender-variant] term Uranian”—presumably in the sound of its continental equivalents. 
On the other hand, the actor, Sir Donald Sinden, who both knew and consulted Lord Alfred Douglas and Sir John Gielgud on the point, once wrote to The Times to dispute the suggestion. 
However, whether the words Ernest and Earnest are homosexual or merely homophonic, one thing is clear.
The choice of names, and particularly the name Ernest, formed part of a gay literary subtext close to Wilde in the 1890s.
Nicholas Frankel’s scholarly edition of The Annotated Importance of Being Earnest
I am fascinated by the editorial introduction and inter-leaf annotations in Nicholas Frankel’s new scholarly edition of The Annotated Importance of Being Earnest . The publisher, Harvard University Press, tells us that Frankel’s running commentary, “ties the play closely to Wilde’s personal life and sexual identity, illuminating literary, biographical, and historical allusions.”
Quite right. The book include not only insights into Wilde’s meaning, but also information about the chronology of Wilde’s textual changes, some of which were made four years after the play was first staged. All this is quite revelatory for those who, like me, appreciate the research that must have gone into it. Or, put another way, it’s the kind of thing you’ll like if you like that kind of thing.
However, this article is not a book review. I have something revelatory of my own.