Barrels from the medieval era that functioned as latrines were recently unearthed in the Danish city of Odense.

Something is rotten in the state of Denmark, Shakespeare wrote in "Hamlet." Archaeologists working at a Danish site might agree with the Bard, after discovering barrels from a latrine that dates back to the 14th century.

And yes, poop still stinks, even after 700 years.

The researchers working on the site found that the wooden barrels — and their malodorous contents — remain in excellent shape, and can reveal much about life in northern European villages in the 1300s. [Through the Years: A Gallery of the World's Toilets]

The archaeological dig is located in Odense, the birthplace of famed author Hans Christian Andersen.

"The excavation is characterized by great conditions for preservation and is located on a medieval site that has been found to contain brick houses, half-timbered houses and stables," lead archaeologist Maria Elisabeth Lauridsen told Discovery News.

Among other revelations, the latrine barrels have shown researchers what folks ate in that era: in a word, berries. "Preliminary results of analysis show that raspberries were popular in Odense in the 1300s," Lauridsen said.

And in case you're wondering what people used before the invention of toilet paper, here's your answer: "The contents also contain small pieces of moss, leather and fabric, which were used as toilet paper," Lauridsen added.

Digging for clues

The Danish research team isn't the first to find clues to medieval life in bathroom waste. A 2013 study published in the International Journal of Paleopathology found evidence of health problems in samples from latrines used by Crusaders traveling through Cyprus.

Researchers from the University of Cambridge dug into a pit of dried-out waste under a latrine in the remains of the castle known as Saranda Kolones at Paphos, a city at the southwestern tip of Cyprus and a UNESCO World Heritage site .

Under a microscope, the researchers saw that the waste samples contained the eggs of two of the world's most common intestinal parasites: whipworms (Trichuris trichiura), which cause the infection known as trichocephalus, and giant roundworms (Ascaris lumbricoides), the largest of the nematodes found in human intestines.

"In these circumstances, [it] is quite likely that medieval soldiers with a heavy parasite load would have been at increased risk of death from starvation during famine episodes such as long sieges or expeditions when supplies ran out," the researchers wrote. "This is because they would have had to share the limited available food with their parasites."

Reusing barrels

The Danish researchers found that barrels on the site probably had been reused — they apparently were originally used to store and transport fish and other goods before serving as toilets.

Researchers found other barrels stacked on top of one another in an underground well. "This well has probably been a part of beer brewing," Lauridsen said. "We have excavated nearby a stock of partially germinated barley, which is commonly used in the brewing process.

"We are finding new and exciting information about the life that was lived in Odense during the 14th century," Lauridsen said.

Follow Marc Lallanilla on Twitter and Google+. Follow us @livescience, Facebook & Google+. Original article on Live Science.