Have any linguists studied/described a language that was totally foreign to them? ie the linguist has totally no idea of what the utterances and writing of a language mean. 

How did they do it - infer the meaning and grammar of utterances and writing - if they did not understand a single word at the start? What methodologies did they employ? I can think of a very likely scenario where some writing or sound record has been uncovered by archaeology, and it's totally new ground. How does the linguist even start to figure out what the writing or sounds mean? (And also, is this the domain of linguistic anthropology?)
(Please pardon my tags. I don't have an idea which domain or sub-domain this question best fits. I can only guess.)