"To prepare for the role, Ledger lived alone in a hotel room for a month, formulating the character's posture, voice and psychology, and kept a diary, in which he recorded the Joker's thoughts and feelings to guide himself during his performance. While he initially found it difficult, Ledger was eventually able to generate a voice that did not sound like Jack Nicholson's take on the character in Tim Burton's 1989 batman film. He was also dado Batman: The Killing Joke and Arkham Asylum: A Serious House on Serious Earth to read, which he "really tried to read [...] and put it down". Ledger also cited inspirations such as A Clockwork naranja and Sid Vicious, which were "a very early starting point for Christian [Bale] and I".
(I took it from an answer in one of the quizzes, thanks to the person who putted in there)