The tale is Aarne-Thompson type 432, The Prince as Bird.
Overwhelmed by grief, a wealthy king was unable to do anything but mourn the untimely loss of his wife. A lady came to him, telling tale that she too had lost her just husband. Together, through sharing loss and loss shared, their lamentaton salved into consolation. In time they talked of other things, fell in love and cherishing one another, wed.
The king had a daughter named Fiordelisa whom he loved dearly. The queen too had a daughter from a prior marriage named Turritella. Turritella though, was less lovely by far than Fiordelisa. One day the king turned to the timely matter of his daughters' well-being and to matters of state and the arranging of marriages. The queen insisted that her daughter be the first to wed as she was the elder and, in her estimate, the far more charming. The king acquiesced. Soon, Prince Charming visited the kingdom. The queen dressed Turritella in all her finery for the reception and bribed Fiordelisa's ladies-in-waiting to steal all her dresses and jewels. Still, King Charming was taken with Fiordelisa and paid only her attention. The queen and Turritella badgered the king until he agreed to lock Fiordelisa up for the length of the visit, and attempted to blacken her character to the Prince.
The queen sent Prince Charming many gifts. When the king heard they were from Turritella, he rejected them. The queen angrily told him that Fiordelisa would be locked in a tower until he left. Prince Charming was outraged and begged to speak with Fiordelisa for a moment. The devious queen agreed but secretly arranged for Turritella to meet the Prince instead. In the darkness of their meeting place, Prince Charming mistook Turritella for Fiordelisa and unwittingly asked for the princess's hand in marriage.
Turritella conspired with her fairy godmother, Mazilla. Mazilla told her it would be difficult to deceive the Prince. At the wedding ceremony Turritella produced the Prince's ring and plead her case. Prince Charming refused to marry her and nothing that Turritella or Mazilla did could persuaded him, at last Mazilla threatened to curse him for breaking his promise. Prince Charming would still not agree and Mazilla turned him into a blue bird.
The queen, on hearing of the news, blamed Fiordelisa; she dressed Turritella as a bride and showed her to Fiordelisa, claiming that Prince Charming had agreed to marry her. She then persuaded the King that Fiordelisa was so infautated with Prince Charming that she had best remain in the tower until she came to her senses. The bluebird flew to the tower and told Fiordelisa the truth. Over many years, the bluebird visited her often, bringing her rich gifts of jewels.
Over the years the queen continued to look for a suitor for Turritella. One day, exasperated by the many suitors that rejected Turritella, the Queen sought Fiordelisa in her tower. She found Fiordelisa singing with the bluebird. Fiordelisa opened the window to let the bird escape, but the Queen discovered her jewelry and guessed that she was receiving some kind of aid. The Queen accused Fiordelisa of treason, but bluebird managed to foil the queen's plot.
For many days, Fiordelisa did not call the bluebird for fear of the queen's spy. One night, as the spy slept soundly she called the bluebird. This continued until one night, the spy heard and told the Queen, who had the fir tree where the bird perched covered with sharp edges, so that he was fatally wounded and could not fly to her. Fiordelisa believed the bluebird had betrayed her. A friend of the king's, an enchanter heard the King lamenting and rescued him from the tree.
The enchanter persuaded Mazilla to change Prince Charming back into a man for a few months, after which if he still refused Turritella, he would be turned back into a bird.
Time went by and Fiordelisa's father died. The people of her kingdom demanded her release. When the Queen resisted they killed her, and Turritella fled to Mazilla. Fiordelisa became queen and made prepartions to find King Charming.
Along the way Fiordelisa met an old woman who proved to be another fairy. The fairy told her that King Charming had his own form and gave her four magical eggs. The first egg she used to climb a great hill of ivory. The second contained a chariot pulled by doves that brought her to King Charming's castle, but she could not reach the king in her disguise. She offered to sell to Turritella the finest jewelry King Charming had given her, and Turritella showed it to King Charming to find out the proper price. He recognized it and was saddened. Turritella returned to Fiordelisa, who would sell them only for a night in the Chamber of Echo, which King Charming had told her of, one night: whatever she said in there would be heard in the king's room. She reproached him with leaving her and lamented all night long, but he had taken a sleeping potion, and did not hear.
She broke the third egg and found a tiny coach drawn by mice. Again, she traded it for the Chamber of Echoes, and lamented all the night long. The pages heard her.
The next day, she opened the last egg, and it held a pie with six singing birds. She gave it to a page who told her that the King takes sleeping potions at night. She bribed the page the singing birds and told him not to give the King a sleeping potion that night. The King was awake, heard Fiordelisa and they were joyfully reunited.
The enchanter and the fairy assured them that they could prevent Mazilla from harming them, and when Turritella attempted to interfere, they turned her into an owl.