Actually, the situation is even weirder in Swedish! Even though we write "att", it is pronounced "o" when used to mark an infinitive but not when used like the word "that" in English. So, in the sentence
Jag tror *att* han gillar *att* äta
I think *that* he likes *to* eat
the first "att" (that) is pronounced similar to its orthography but the second one (to) is pronounced "o".