It must have been surreal for the employee who scribbled “Obama” on the president’s burger order at Charlie’s Sandwich Shoppe in the South End on Wednesday. Barack Obama stopped into the famous eatery for a quick bite while in town to campaign for US Senate candidate Ed Markey. Charlie’s has a long history of entertaining famous celebrities and pols (the late Ted Kennedy, Al Gore, Mayor Thomas M. Menino). Just last year, the sandwich spot was featured in the Boston comedy film “Ted,” in a scene where Mark Wahlberg meets up with Mila Kunis. If anyone — including Obama — is interested in learning more about the restaurant’s history, check out George Cuddy’s e-book “Where Hash Rules,” which was released in March.