Juliette, or Key of Dreams(1951)

Michel has stolen from his employer, Mr Bellanger, for the love of Juliette. He is now in jail. One night, while sleeping in his cell, he wakes up all of a sudden, the gates open and he finds himself in a strange village where all the inhabitants have lost their memory. There, meets Juliette again who seems to agree to marry a powerful man, who might well be Bluebeard...