The Ben Ish Chai (Od Yosef Chai, Matos) tells the story of a simple, G-d fearing person who didn't understand lashon hakodesh. Once, he was in the beis haknesses, and heard the chazan sing, הדשן בבית נשרפין ואלו אלו (from איזהו מקומן) in a beautiful tune. The words mean, "Both these korbanos are burned in the house of ashes." The simple person didn't know the translation but figured that since the chazan sang them so melodiously, they must be a special blessing. Wanting to bless his children in a beautiful way, he memorized these words, and every Friday night when he benched his children, he would say with immense kavanah הדשן בבית נשרפין ואלו אלו.
Once, a talmid chacham stayed in his home on Friday and heard the simple man bless his children and say, הדשן בבית נשרפין ואלו אלו. Frightened by the implication of these words, the chacham said to the simple man, "Why are you cursing your children?" He warned him not to say this "blessing" ever again.
That night, the scholar had a dream, and heaven informed him that he was wrong for stopping this simple man from reciting these words. Because he was saying these words with temimus, Hashem would rearrange the letters and turn them into a blessing for his children. (This story is also written briefly by the Or HaChaim HaKadosh, Rishon l'Tzion, Mishlei 3.)
Another Story from Sefer Chassidim
Similarly, Sefer Chassidim (18) tells a story of a kohen who used to say, – וישמדך 'ה יברכך ישמדך means "Hashem should destroy you ch”v"! The chacham of the beis haknesses told this kohen that he may no longer say birchas kohanim because of this terrible error. But Hashem wasn't happy that he stopped him. "He was shown from heaven that he would be punished if he didn't permit this kohen to say birchas kohanim."
The Sefer Chassidim explains, "The Creator who examines man's heart only wants the heart. Even when he doesn't say the words correctly, it is considered like he said them correctly. And those who say pesukei d'zimra in a loud, sweet voice, although they say the words erroneously, they are accepted like sweet incense, and Hakadosh Baruch Hu delights with them."
