I've always found it weird how broken this is. Some US airlines have separate entry fields for first, middle, and last names. But then they jam it together on the boarding pass as "Last, Firstmiddle" (yes, with first and middle mashed together, and middle lowercased). That of course doesn't match my ID, but I've never had a problem traveling, even when I sometimes leave out my middle name entirely. (I guess I get less scrutiny most places since I'm an American white male.)