HÉROUXVILLE, Quebec — The stylized lilies of the Quebec flag, symbols of the French crown, flutter conspicuously in this sleepy village, population 1,300. Also hard to miss is the single set of traffic lights, the convenience store selling cloyingly sweet Québécois caramel cakes and the local residents, who are eying me suspiciously.

With its gray identikit houses seemingly frozen in a 1950s time warp, Hérouxville would seem like just another Quebec village. Except that this quiet hamlet attracted global opprobrium about a decade ago when the local council introduced a code of conduct for immigrants that, among other things, warned against stoning women in public and burning them alive. There was also a section explaining Christmas trees.

“We listen to music, we drink alcoholic beverages in public or private places, we dance and at the end of every year, we decorate a tree with balls and tinsel and some lights,” the code explained. “The only time you may mask or cover your face is during Halloween.”

There was just one thing: The town had no immigrants.

The code of conduct, which also affirmed the rights of same-sex parents, was the brainchild of a local official, André Drouin, who died last year, and had come up with the idea after traveling in the Middle East.