text:
Crouching Tiger, Hidden Dragon

Crouching Tiger, Hidden Dragon is a 2000 wuxia martial arts action-adventure film directed by Ang Lee and written for the screen by Wang Hui-ling, James Schamus, and Tsai Kuo-jung. The film stars Chow Yun-fat, Michelle Yeoh, Zhang Ziyi, and Chang Chen. It is based on the Chinese novel of the same name, serialized between 1941 and 1942 by Wang Dulu, the fourth part of his Crane Iron pentalogy.

A multinational venture, the film was made on a US$17 million budget, and was produced by Edko Films and Zoom Hunt Productions in collaboration with China Film Co-productions Corporation and Asian Union Film & Entertainment for Columbia Pictures Film Production Asia in association with Good Machine International. The film premiered at the Cannes Film Festival on 18 May 2000, and was theatrically released in the United States on 8 December. With dialogue in Standard Chinese, subtitled for various markets, Crouching Tiger, Hidden Dragon became a surprise international success, grossing $213.5 million worldwide. It grossed US$128 million in the United States, becoming the highest-grossing foreign produced Mandarin-language film in American history. The film was the first foreign-language film to break the $100 million mark in the United States.

The film was praised by critics for its story, direction, cinematography, and martial arts sequences. Crouching Tiger, Hidden Dragon won over 40 awards and was nominated for 10 Academy Awards in 2001, including Best Picture, and won Best Foreign Language Film, Best Art Direction, Best Original Score, and Best Cinematography, receiving the most nominations ever for a non-English-language film at the time, until 2018's Roma tied this record. The film also won four BAFTAs and two Golden Globe Awards, each of them for Best Foreign Film. For retrospective years, Crouching Tiger is often cited as one of the finest wuxia films ever made and has been widely regarded as one of the greatest films of the 21st century.

Plot
In Qing dynasty China, Li Mu Bai is a renowned Wudang swordsman, and his friend Yu Shu Lien, a warrior, heads a private security company. Shu Lien and Mu Bai have long had feelings for each other, but because Shu Lien had been engaged to Mu Bai's close friend, Meng Sizhao before his death, Shu Lien and Mu Bai feel bound by loyalty to Meng Sizhao and have not revealed their feelings to each other. Mu Bai, choosing to retire from the life of a swordsman, asks Shu Lien to give his fabled 400-year-old sword "Green Destiny" to their benefactor Sir Te in Beijing. Long ago, Mu Bai's teacher was killed by Jade Fox, a woman who sought to learn Wudang secrets. While at Sir Te's place, Shu Lien meets Yu Jiaolong, or Jen, who is the daughter of the rich and powerful Governor Yu and is about to get married.

One evening, a masked thief sneaks into Sir Te's estate and steals the Green Destiny. Sir Te's servant Master Bo and Shu Lien trace the theft to Governor Yu's compound, where Jade Fox had been posing as Jen's governess for many years. Soon after, Mu Bai arrives in Beijing and discusses the theft with Shu Lien. Master Bo makes the acquaintance of Inspector Tsai, a police investigator from the provinces, and his daughter May, who have come to Beijing in pursuit of Fox. Fox challenges the pair and Master Bo to a showdown that night. Following a protracted battle, the group is on the verge of defeat when Mu Bai arrives and outmaneuvers Fox. She reveals that she killed Mu Bai's teacher because he would sleep with her, but refuse to take a woman as a disciple, and she felt it poetic justice for him to die at a woman's hand. Just as Mu Bai is about to kill her, the masked thief reappears and helps Fox. Fox kills Tsai before fleeing with the thief (who is revealed to be Jen). After seeing Jen fight Mu Bai, Fox realizes Jen had been secretly studying the Wudang manual. Fox is illiterate and could only follow the diagrams, whereas Jen's ability to read the manual allowed her to surpass her teacher in martial arts.

At night, a bandit named Lo breaks into Jen's bedroom and asks her to leave with him. In the past, when Governor Yu and his family were traveling in the western deserts of Xinjiang, Lo and his bandits raided Jen's caravan and Lo stole her comb. She pursued him to his desert cave to retrieve her comb. However, the pair soon fell in love. Lo eventually convinced Jen to return to her family, though not before telling her a legend of a man who jumped off a mountain to make his wishes come true. Because the man's heart was pure, his wish was granted and he was unharmed, but flew away never to be seen again. Lo has come now to Beijing to persuade Jen not to go through with her arranged marriage. However, Jen refuses to leave with him. Later, Lo interrupts Jen's wedding procession, begging her to leave with him. Shu Lien and Mu Bai convince Lo to wait for Jen at Mount Wudang, where he will be safe from Jen's family, who are furious with him. Jen runs away from her husband on their wedding night before the marriage can be consummated. Disguised in men's clothing, she is accosted at an inn by a large group of warriors; armed with the Green Destiny and her own superior combat skills, she emerges victorious.

Jen visits Shu Lien, who tells her that Lo is waiting for her at Mount Wudang. After an angry exchange, the two women engage in a duel. Shu Lien is the superior fighter, but Jen wields the Green Destiny and is able to destroy each weapon that Shu Lien wields, until Shu Lien finally manages to defeat Jen with a broken sword. When Shu Lien shows mercy, Jen wounds Shu Lien in the arm. Mu Bai arrives and pursues Jen into a bamboo forest, where he offers to take her as his student. Jen agrees if he can take Green Destiny from her in three moves. Mu Bai is able to take the sword in only one move, but Jen reneges on her promise, and Mu Bai throws the sword over a waterfall. Jen dives after the sword and is rescued by Fox. Fox puts Jen into a drugged sleep and places her in a cavern, where Mu Bai and Shu Lien discover her. Fox suddenly attacks them with poisoned needles. Mu Bai mortally wounds Fox, only to realize that one of the needles has hit him in the neck. Before dying, Fox confesses that her goal had been to kill Jen because Jen had hidden the secrets of Wudang's fighting techniques from her.

Contrite, Jen leaves to prepare an antidote for the poisoned dart. With his last breath, Mu Bai finally confesses his love for Shu Lien. He dies in her arms as Jen returns. Shu Lien forgives Jen, telling her to go to Lo and always be true to herself. The Green Destiny is returned to Sir Te. Jen goes to Mount Wudang and spends the night with Lo. The next morning, Lo finds Jen standing on a bridge overlooking the edge of the mountain. In an echo of the legend that they spoke about in the desert, she asks him to make a wish. Lo wishes for them to be together again, back in the desert. Jen leaps from the bridge, falling into the mists below.

Cast
Credits from British Film Institute:

 * Chow Yun-fat as Li Mu Bai (李慕白, )
 * Michelle Yeoh as Yu Shu Lien (俞秀蓮, )
 * Zhang Ziyi as Jen Yu (玉嬌龍, )
 * Chang Chen as Lo "Dark Cloud" Xiao Hou (羅小虎, )
 * Lang Sihung as Sir Te (貝勒爺, )
 * Cheng Pei-pei as Jade Fox (碧眼狐狸, )
 * Li Fazeng as Governor Yu (玉大人, )
 * Wang Deming as Inspector Tsai (蔡九, )
 * Li Li as Tsai May (蔡香妹, )
 * Hai Yan as Madam Yu (玉夫人, )
 * Gao Xi'an as Bo (劉泰保, )
 * Huang Suying as Aunt Wu (吳媽, )
 * Zhang Jinting as De Lu (德祿, )
 * Du Zhenxi as Uncle Jiao (焦大爺, )
 * Li Kai as Gou Jun Pei (魯君佩, )
 * Feng Jianhua as Shining Phoenix Mountain Gou (魯君雄, )
 * Ma Zhongxuan as Iron Arm Mi (米大鏢, )
 * Li Bao-Cheng as Flying Machete Chang (飛刀常, )
 * Yang Yongde as Monk Jing (法廣和尚, )

Title
The title "Crouching Tiger, Hidden Dragon" is a literal translation of the Chinese idiom "臥虎藏龍" which describes a place or situation that is full of unnoticed masters. It is from a poem of the ancient Chinese poet Yu Xin (513–581) that reads "暗石疑藏虎，盤根似臥龍", which means "behind the rock in the dark probably hides a tiger, and the coiling giant root resembles a crouching dragon". The title also has several other layers of meaning. On one level, the Chinese characters in the title connect to the narrative that the last character in Xiaohu and Jiaolong's names mean "tiger" and "dragon", respectively. On another level, the Chinese idiomatic phrase is an expression referring to the undercurrents of emotion, passion, and secret desire that lie beneath the surface of polite society and civil behavior, which alludes to the film's storyline.

Gender roles
The success of the Disney animated feature Mulan (1998) popularized the image of the Chinese woman warrior in the west. The storyline of Crouching Tiger, Hidden Dragon is mostly driven by the three female characters. In particular, Jen is driven by her desire to be free from the gender role imposed on her, while Shu Lien, herself oppressed by the gender role, tries to lead Jen back into the role deemed appropriate for her. Some prominent martial arts disciplines are traditionally held to have been originated by women, e.g., Wing Chun. The film's title refers to masters one does not notice, which necessarily includes mostly women, and therefore suggests the advantage of a female bodyguard.

Poison
Poison is also a significant theme in the film. The Chinese word "毒" (dú) means not only physical poison but also cruelty and sinfulness. In the world of martial arts, the use of poison is considered an act of one who is too cowardly and dishonorable to fight; and indeed, the only character who explicitly fits these characteristics is Jade Fox. The poison is a weapon of her bitterness and quest for vengeance: she poisons the master of Wudang, attempts to poison Jen, and succeeds in killing Mu Bai using a poisoned needle. In further play on this theme by the director, Jade Fox, as she dies, refers to the poison from a young child, "the deceit of an eight-year-old girl", referring to what she considers her own spiritual poisoning by her young apprentice Jen. Li Mu Bai himself warns that, without guidance, Jen could become a "poison dragon".

China of the imagination
The story is set during the Qing dynasty (1644–1912), but it does not specify an exact time. Lee sought to present a "China of the imagination" rather than an accurate vision of Chinese history. At the same time, Lee also wanted to make a film that Western audiences would want to see. Thus, the film is shot for a balance between Eastern and Western aesthetics. There are some scenes showing uncommon artistry for the typical martial arts film such as an airborne battle among wispy bamboo plants.

Production
The film was adapted from the novel Crouching Tiger, Hidden Dragon by Wang Dulu, serialized between 1941 and 1942 in Qingdao Xinmin News. The novel is the fourth in a sequence of five. In the contract reached between Columbia Pictures and Ang Lee and Hsu Li-kong, they agreed to invest US$6 million in filming, but the stipulated recovery amount must be more than six times before the two parties will start to pay dividends.

Casting
Shu Qi was Ang Lee's first choice for the role of Jen, but she turned it down.

Filming
Although its Academy Award for Best Foreign Language Film was presented to Taiwan, Crouching Tiger, Hidden Dragon was in fact an international co-production between companies in four regions: the Chinese company China Film Co-production Corporation, the American companies Columbia Pictures Film Production Asia, Sony Pictures Classics, and Good Machine, the Hong Kong company Edko Films, and the Taiwanese Zoom Hunt Productions, as well as the unspecified United China Vision and Asia Union Film & Entertainment, created solely for this film.

The film was made in Beijing, with location shooting in Urumchi, Western Provinces, Taklamakan Plateau, Shanghai and Anji of China. The first phase of shooting was in the Gobi Desert where it consistently rained. Director Ang Lee noted, "I didn't take one break in eight months, not even for half a day. I was miserable—I just didn't have the extra energy to be happy. Near the end, I could hardly breathe. I thought I was about to have a stroke." The stunt work was mostly performed by the actors themselves and Ang Lee stated in an interview that computers were used "only to remove the safety wires that held the actors" aloft. "Most of the time you can see their faces," he added. "That's really them in the trees."

Another compounding issue was the difference between accents of the four lead actors: Chow Yun-fat is from Hong Kong and speaks Cantonese natively; Michelle Yeoh is from Malaysia and grew up speaking English and Malay, so she learned the Standard Chinese lines phonetically; Chang Chen is from Taiwan and he speaks Standard Chinese in a Taiwanese accent. Only Zhang Ziyi spoke with a native Mandarin accent that Ang Lee wanted. Chow Yun Fat said, on "the first day [of shooting], I had to do 28 takes just because of the language. That's never happened before in my life."

The film specifically targeted Western audiences rather than the domestic audiences who were already used to Wuxia films. As a result, high-quality English subtitles were needed. Ang Lee, who was educated in the West, personally edited the subtitles to ensure they were satisfactory for Western audiences.

Soundtrack
The score was composed by Dun Tan in 1999. It was played for the movie by the Shanghai Symphony Orchestra, the Shanghai National Orchestra and the Shanghai Percussion Ensemble. It features solo passages for cello played by Yo-Yo Ma. The "last track" ("A Love Before Time") features Coco Lee, who later sang it at the Academy Awards. The composer Chen Yuanlin also collaborated in the project. The music for the entire film was produced in two weeks. Tan the next year (2000) adapted his filmscore as a cello concerto called simply "Crouching Tiger."

Marketing
The film was adapted into a video game and a series of comics, and it led to the original novel being adapted into a 34-episode Taiwanese television series. The latter was released in 2004 as New Crouching Tiger, Hidden Dragon for Northern American release.

Home media
The film was released on VHS and DVD on 5 June 2001 by Columbia TriStar Home Entertainment. It was also released on UMD on 26 June 2005. In the United Kingdom, it was watched by 3.5 million viewers on television in 2004, making it the year's most-watched foreign-language film on television.

Restoration
The film was re-released in a 4K restoration by Sony Pictures Classics in 2023.

Box office
The film premiered in cinemas on 8 December 2000, in limited release within the United States. During its opening weekend, the film opened in 15th place, grossing $663,205 in business, showing at 16 locations. On 12 January 2001, Crouching Tiger, Hidden Dragon premiered in cinemas in wide release throughout the U.S., grossing $8,647,295 in business, ranking in sixth place. The film Save the Last Dance came in first place during that weekend, grossing $23,444,930. The film's revenue dropped by almost 30% in its second week of release, earning $6,080,357. For that particular weekend, the film fell to eighth place, screening in 837 theaters. Save the Last Dance remained unchanged in first place, grossing $15,366,047 in box-office revenue. During its final week in release, Crouching Tiger, Hidden Dragon opened in a distant 50th place with $37,233 in revenue. The film went on to top out domestically at $128,078,872 in total ticket sales through a 31-week theatrical run. Internationally, the film took in an additional $85,446,864 in box-office business for a combined worldwide total of $213,525,736. For 2000 as a whole, the film cumulatively ranked at a worldwide box-office performance position of 19.

Critical response
"Crouching Tiger, Hidden Dragon, which is based on an early 20th century novel by Wang Dulu, unfolds much like a comic book, with the characters and their circumstances being painted using wide brush strokes. Subtlety is not part of Lee's palette; he is going for something grand and melodramatic, and that's what he gets."

Crouching Tiger, Hidden Dragon was widely acclaimed in the Western world, receiving numerous awards. On Rotten Tomatoes, the film holds an approval rating of 98% based on 168 reviews, with an average rating of 8.6/10. The site's critical consensus states: "The movie that catapulted Ang Lee into the ranks of upper echelon Hollywood filmmakers, Crouching Tiger, Hidden Dragon features a deft mix of amazing martial arts battles, beautiful scenery, and tasteful drama." Metacritic reported the film had an average score of 94 out of 100, based on 32 reviews, indicating "universal acclaim".

Some Chinese-speaking viewers were bothered by the accents of the leading actors. Neither Chow (a native Cantonese speaker) nor Yeoh (who was born and raised in Malaysia) spoke Mandarin Chinese as a mother tongue. All four main actors spoke Standard Chinese with vastly different accents: Chow speaks with a Cantonese accent, Yeoh with a Malaysian accent, Chang Chen with a Taiwanese accent, and Zhang Ziyi with a Beijing accent. Yeoh responded to this complaint in a 28 December 2000, interview with Cinescape. She argued, "My character lived outside of Beijing, and so I didn't have to do the Beijing accent." When the interviewer, Craig Reid, remarked, "My mother-in-law has this strange Sichuan-Mandarin accent that's hard for me to understand," Yeoh responded: "Yes, provinces all have their very own strong accents. When we first started the movie, Cheng Pei Pei was going to have her accent, and Chang Zhen was going to have his accent, and this person would have that accent. And in the end nobody could understand what they were saying. Forget about us, even the crew from Beijing thought this was all weird."

The film led to a boost in popularity of Chinese wuxia films in the western world, where they were previously little known, and led to films such as Hero and House of Flying Daggers, both directed by Zhang Yimou, being marketed towards Western audiences. The film also provided the breakthrough role for Zhang Ziyi's career, who noted:

"Because of movies like Crouching Tiger, Hidden Dragon, Hero, and Memoirs of a Geisha, a lot of people in the United States have become interested not only in me but in Chinese and Asian actors in general. Because of these movies, maybe there will be more opportunities for Asian actors."

Film Journal noted that Crouching Tiger, Hidden Dragon "pulled off the rare trifecta of critical acclaim, boffo box-office and gestalt shift", in reference to its ground-breaking success for a subtitled film in the American market.

Accolades
Gathering widespread critical acclaim at the Toronto and New York film festivals, the film also became a favorite when Academy Awards nominations were announced in 2001. The film was screened out of competition at the 2000 Cannes Film Festival. The film received ten Academy Award nominations, which was the highest ever for a non-English language film, up until it was tied by Roma (2018).

The film is ranked at number 497 on Empire's 2008 list of the 500 greatest movies of all time. and at number 66 in the magazine's 100 Best Films of World Cinema, published in 2010. In 2010, the Independent Film & Television Alliance selected the film as one of the 30 Most Significant Independent Films of the last 30 years. In 2016, it was voted the 35th-best film of the 21st century as picked by 177 film critics from around the world in a poll conducted by BBC. The film was included in BBC's 2018 list of The 100 greatest foreign language films ranked by 209 critics from 43 countries around the world. In 2019, The Guardian ranked the film 51st in its 100 best films of the 21st century list.

Sequel
In 2001, it was reported that director Ang Lee was planning to make a sequel to the film. Crouching Tiger, Hidden Dragon: Sword of Destiny, was released in 2016. It was directed by Yuen Wo-ping, who was the action choreographer for the first film. It is a co-production between Pegasus Media, China Film Group Corporation, and the Weinstein Company. Unlike the original film, the sequel was filmed in English for international release and dubbed into Chinese for Chinese releases.

Sword of Destiny is based on Iron Knight, Silver Vase, the next (and last) novel in the Crane–Iron Pentalogy. It features a mostly new cast, headed by Donnie Yen. Michelle Yeoh reprised her role from the original. Zhang Ziyi was also approached to appear in Sword of Destiny but refused, stating that she would only appear in a sequel if Ang Lee were directing it.

In the West, the sequel was for the most part not shown in theaters, instead being distributed direct-to-video by the streaming service Netflix.

Posterity
The theme of Janet Jackson's song "China Love" was related to the film by MTV News, in which Jackson sings of the daughter of an emperor in love with a warrior, unable to sustain relations when forced to marry into royalty.

The names of the pterosaur genus Kryptodrakon and the ceratopsian genus Yinlong (both meaning "hidden dragon" in Greek and Chinese respectively) allude to the film.

The character of Lo, or "Dark Cloud" the desert bandit, influenced the development of the protagonist of the Prince of Persia series of video games.

In the video game Def Jam Fight for NY: The Takeover there are two hybrid fighting styles that pay homage to this movie. Which have the following combinations: Crouching tiger (Martial Arts + Streetfighting + Submissions) and Hidden Dragon (Martial Arts + Streetfighting + Kickboxing).

title: Crouching Tiger, Hidden Dragon


text:
Charlemagne

Charlemagne (2 April 748 – 28 January 814) was King of the Franks from 768, King of the Lombards from 774, and Emperor of what is now known as the Carolingian Empire from 800, holding these titles until his death in 814. He united most of Western and Central Europe and was the first recognised emperor to rule in the west after the fall of the Western Roman Empire, approximately three centuries earlier. Charlemagne's reign was marked by political and social changes that had lasting impact on Europe throughout the Middle Ages.

A member of the Frankish Carolingian dynasty, Charlemagne was the eldest son of Pepin the Short and Bertrada of Laon. With his brother, Carloman I, he became king of the Franks in 768 following Pepin's death and became the sole ruler three years later. Charlemagne continued his father's policy of protecting the papacy and became its chief defender, removing the Lombards from power in northern Italy in 774. His reign saw a period of expansion that led to the conquests of Bavaria, Saxony and northern Spain, as well as other campaigns that led Charlemagne to extend his rule over a large part of Europe. Charlemagne spread Christianity to his new conquests (often by force), as seen at the Massacre of Verden against the Saxons. He also sent envoys and initiated diplomatic contact with the Abbasid caliph Harun al-Rashid during the 790s, due to their mutual interest in Spanish affairs.

In 800, Charlemagne was crowned emperor in Rome by Pope Leo III. Although historians debate the coronation's significance, the title represented the height of his prestige and authority. Charlemagne's position as the first emperor in the West in over 300 years brought him into conflict with the Eastern Roman Empire in Constantinople. Through his assumption of the imperial title, he is considered the forerunner to the line of Holy Roman Emperors, which persisted into the nineteenth century. As king and emperor, Charlemagne engaged in a number of reforms in administration, law, education, military organization, and religion, which shaped Europe for centuries. The stability of his reign began a period of cultural activity known as the Carolingian Renaissance.

Charlemagne died in 814 and was laid to rest at Aachen Cathedral in Aachen, his imperial capital city. He was succeeded by his only surviving son, Louis the Pious. After Louis, the Frankish kingdom was divided and eventually coalesced into West and East Francia, which later became France and the Holy Roman Empire, respectively. Charlemagne's profound impact on the Middle Ages and influence on the territory he ruled has led him to be called the "Father of Europe" by many historians. He is seen as a founding figure by multiple European states and a number of historical royal houses of Europe trace their lineage back to him. Charlemagne has been the subject of artworks, monuments and literature during and after the medieval period and is venerated by the Catholic Church.

Name
Several languages were spoken in Charlemagne's world, and he was known to contemporaries as Karlus in the Old High German he spoke; as Karlo to Romance speakers; and as Carolus (or Karolus) in Latin, the formal language of writing and diplomacy. Charles is the modern English form of these names. The name Charlemagne, as the emperor is normally known in English, comes from the French Charles-le-magne ('Charles the Great'). In modern German, he is known as Karl der Große. The Latin epithet magnus ('great') may have been associated with him during his lifetime, but this is not certain. The contemporary Royal Frankish Annals routinely call him Carolus magnus rex ("Charles the great king"). That epithet is attested in the works of the Poeta Saxo around 900, and it had become commonly applied to him by 1000.

Charlemagne was named after his grandfather, Charles Martel. That name, and its derivatives, are unattested before their use by Charles Martel and Charlemagne. Karolus was adapted by Slavic languages as their word for "king" (korol', król and král) through Charlemagne's influence or that of his great-grandson, Charles the Fat.

Political background and ancestry

By the sixth century, the western Germanic tribe of the Franks had been Christianised; this was due in considerable measure to the conversion of their king, Clovis I, to Catholicism. The Franks had established a kingdom in Gaul in the wake of the Fall of the Western Roman Empire. This kingdom, Francia, grew to encompass nearly all of present-day France and Switzerland, along with parts of modern Germany and the Low Countries under the rule of the Merovingian dynasty. Francia was often divided under different Merovingian kings, due to the partible inheritance practised by the Franks. The late seventh century saw a period of war and instability following the murder of King Childeric II, which led to factional struggles among the Frankish aristocrats.

Pepin of Herstal, mayor of the palace of Austrasia, ended the strife between various kings and their mayors with his 687 victory at the Battle of Tertry. Pepin was the grandson of two important figures of Austrasia: Arnulf of Metz and Pepin of Landen. The mayors of the palace had gained influence as the Merovingian kings' power waned due to divisions of the kingdom and several succession crises. Pepin was eventually succeeded by his son Charles, later known as Charles Martel. Charles did not support a Merovingian successor upon the death of King Theuderic IV in 737, leaving the throne vacant. He made plans to divide the kingdom between his sons, Carloman and Pepin the Short, who succeeded him after his death in 741. The brothers placed the Merovingian Childeric III on the throne in 743. In 747, Carloman abdicated and entered a monastery in Rome. He had at least two sons; the elder, Drogo, took his place.

Birth
Charlemagne was the first-born son of Pepin the Short and his wife, Bertrada, a member of an influential, noble Austrasian family. His birth date is uncertain, although it was most likely in 748. An older tradition based on three sources, however, gives a birth year of 742. The ninth-century biographer Einhard reports Charlemagne as being in his seventy-second year at his death; the Royal Frankish Annals imprecisely gives his age at death as about 71, and his original epitaph called him a septuagenarian. Einhard said that he did not know much about Charlemagne's early life; some modern scholars believe that not knowing the emperor's true age, he presented an exact date in keeping with the Roman imperial biographies of Suetonius which he used as a model. All three sources may have been influenced by Psalm 90: "The days of our years are threescore years and ten".

Historian Karl Ferdinand Werner challenged the acceptance of 742 as the Frankish king's birth year, citing an addition to the Annales Petaviani which records Charlemagne's birth in 747. Lorsch Abbey commemorated Charlemagne's date of birth as 2 April from the mid-ninth century, and this date is likely to be genuine. Matthias Becher built on Werner's work and showed that 2 April in the year recorded would have actually been in 748, since the annalists recorded the start of the year from Easter rather than 1 January. Presently, most scholars accept April 748 for Charlemagne's birth. Roger Collins, believing that Pepin and Bertrada did not marry until 749, considers Charlemagne an illegitimate child. Charlemagne's place of birth is also unknown, and the Frankish palaces in Vaires-sur-Marne and Quierzy are among the places suggested by scholars. Pepin the Short held an assembly in Düren in 748, but it cannot be proved that it took place in April or if Bertrada was with him.

Language and education
Einhard refers to Charlemagne's patrius sermo ("native tongue"). Most scholars have identified this as a form of Old High German, probably a Rhenish Franconian dialect. Due to the prevalence in Francia of "rustic Roman", he was probably functionally bilingual in Germanic and Romance dialects at an early age. Charlemagne also spoke Latin and, according to Einhard, could understand and (perhaps) speak some Greek.

Charlemagne's father Pepin had been educated at the abbey of Saint-Denis, although the extent of Charlemagne's formal education is unknown. He almost certainly was trained in military matters as a youth in Pepin's court, which was itinerant. Charlemagne also asserted his own education in the liberal arts in encouraging their study by his children and others, although it is unknown whether his study was as a child or at court during his later life. The question of Charlemagne's literacy is debated, with little direct evidence from contemporary sources. He normally had texts read aloud to him and dictated responses and decrees, but this was not unusual even for a literate ruler at the time. Historian Johannes Fried considers it likely that Charlemagne would have been able to read, but the medievalist Paul Dutton writes that "the evidence for his ability to read is circumstantial and inferential at best" and concludes that it is likely that he never properly mastered the skill. Einhard makes no direct mention of Charlemagne reading, and recorded that he only attempted to learn to write later in life.

Accession and reign with Carloman
There are only occasional references to Charlemagne in the Frankish annals during his father's lifetime. By 751 or 752, Pepin had deposed Childeric and replaced him as king. Early Carolingian-influenced sources claim that Pepin's seizure of the throne was sanctioned beforehand by Pope Stephen II, but modern historians dispute this. It is possible that papal approval came only when Stephen travelled to Francia in 754 (apparently to request Pepin's aid against the Lombards), and on this trip anointed Pepin as king; this legitimised his rule. Charlemagne was sent to greet and escort the Pope, and he and his younger brother Carloman were anointed with their father. Pepin sidelined Drogo around the same time, sending him and his brother to a monastery.

Charlemagne began issuing charters in his own name in 760. The following year, he joined his father's campaign against Aquitaine. Aquitaine, led by Dukes Hunald and Waiofar, was constantly in rebellion during Pepin's reign. Pepin fell ill on campaign there and died on 24 September 768, and Charlemagne and Carloman succeeded their father. They had separate coronations, Charlemagne at Noyon and Carloman at Soissons, on 9 October. The brothers maintained separate palaces and spheres of influence, although they were considered joint rulers of a single Frankish kingdom. The Royal Frankish Annals report that Charlemagne ruled Austrasia and Carloman ruled Burgundy, Provence, Aquitaine, and Alamannia, with no mention made of which brother received Neustria. The immediate concern of the brothers was the ongoing uprising in Aquitaine. They marched into Aquitaine together, but Carloman returned to Francia for unknown reasons and Charlemagne completed the campaign on his own. Charlemagne's capture of Duke Hunald marked the end of ten years of war that had been waged in the attempt to bring Aquitaine into line.

Carloman's refusal to participate in the war against Aquitaine led to a rift between the kings. It is uncertain why Carloman abandoned the campaign; the brothers may have disagreed about control of the territory, or Carloman was focused on securing his rule in the north of Francia. Regardless of the strife between the kings, they maintained a joint rule for practical reasons. Charlemagne and Carloman worked to obtain the support of the clergy and local elites to solidify their positions.

Pope Stephen III was elected in 768, but was briefly deposed by Antipope Constantine II before being restored to Rome. Stephen's papacy experienced continuing factional struggles, so he sought support from the Frankish kings. Both brothers sent troops to Rome, each hoping to exert his own influence. The Lombard king Desiderius also had interests in Roman affairs, and Charlemagne attempted to enlist him as an ally. Desiderius already had alliances with Bavaria and Benevento through the marriages of his daughters to their dukes, and an alliance with Charlemagne would add to his influence. Charlemagne's mother, Bertrada, went on his behalf to Lombardy in 770 and brokered a marriage alliance before returning to Francia with his new bride. Desiderius's daughter is traditionally known as Desiderata, although she may have been named Gerperga. Anxious about the prospect of a Frankish–Lombard alliance, Pope Stephen sent a letter to both Frankish kings decrying the marriage and separately sought closer ties with Carloman.

Charlemagne had already had a relationship with the Frankish noblewoman Himiltrude, and they had a son in 769 named Pepin. Paul the Deacon wrote in his 784 Gesta Episcoporum Mettensium that Pepin was born "before legal marriage", but does not say whether Charles and Himiltrude ever married, were joined in a non-canonical marriage (friedelehe), or married after Pepin was born. Pope Stephen's letter described the relationship as a legitimate marriage, but he had a vested interest in preventing Charlemagne from marrying Desiderius's daughter.

Carloman died suddenly on 4 December 771, leaving Charlemagne sole king of the Franks. He moved immediately to secure his hold on his brother's territory, forcing Carloman's widow Gerberga to flee to Desiderius's court in Lombardy with their children. Charlemagne ended his marriage to Desiderius's daughter and married Hildegard, daughter of count Gerold, a powerful magnate in Carloman's kingdom. This was a reaction to Desiderius's sheltering of Carloman's family and a move to secure Gerold's support.

Annexation of the Lombard Kingdom
Charlemagne's first campaigning season as sole king of the Franks was spent on the eastern frontier in his first war against the Saxons, who had been engaging in border raids on the Frankish kingdom when Charlemagne responded by destroying the pagan Irminsul at Eresburg and seizing their gold and silver. The success of the war helped secure Charlemagne's reputation among his brother's former supporters and funded further military action. The campaign was the beginning of over thirty years of nearly-continuous warfare against the Saxons by Charlemagne.

Pope Adrian I succeeded Stephen III in 772, and sought the return of papal control of cities that had been captured by Desiderius. Unsuccessful in dealing with the Lombard king directly, Adrian sent emissaries to Charlemagne to gain his support for recovering papal territory. Charlemagne, in response to this appeal and the dynastic threat of Carloman's sons in the Lombard court, gathered his forces to intervene. He first sought a diplomatic solution, offering gold to Desiderius in exchange for the return of the papal territories and his nephews. This overture was rejected, and Charlemagne's army (commanded by himself and his uncle, Bernard) crossed the Alps to besiege the Lombard capital of Pavia in late 773.

Charlemagne's second son (also named Charles) was born in 772, and Charlemagne brought the child and his wife to the camp at Pavia. Hildegard was pregnant, and gave birth to a daughter named Adelhaid. The baby was sent back to Francia, but died on the way. Charlemagne left Bernard to maintain the siege at Pavia while he took a force to capture Verona, where Desiderius's son Adalgis had taken Carloman's sons. Charlemagne captured the city; no further record exists of his nephews or of Carloman's wife, and their fate is unknown. Recent biographer, Janet Nelson compares them to the Princes in the Tower in the Wars of the Roses. Fried suggests that the boys were forced into a monastery (a common solution of dynastic issues), or "an act of murder smooth[ed] Charlemagne’s ascent to power." Adalgis was not captured by Charlemagne, and fled to Constantinople.

Charlemagne left the siege in April 774 to celebrate Easter in Rome. Pope Adrian arranged a formal welcome for the Frankish king, and they swore oaths to each other over the relics of St. Peter. Adrian presented a copy of the agreement between Pepin and Stephen III outlining the papal lands and rights Pepin had agreed to protect and restore. It is unclear which lands and rights the agreement involved, which remained a point of dispute for centuries. Charlemagne placed a copy of the agreement in the chapel above St. Peter's tomb as a symbol of his commitment, and left Rome to continue the siege.

Disease struck the Lombards shortly after his return to Pavia, and they surrendered the city by June 774. Charlemagne deposed Desiderius and took the title of King of the Lombards. The takeover of one kingdom by another was "extraordinary", and the authors of The Carolingian World call it "without parallel". Charlemagne secured the support of the Lombard nobles and Italian urban elites to seize power in a mainly-peaceful annexation. Historian Rosamond McKitterick suggests that the elective nature of the Lombard monarchy eased Charlemagne's takeover, and Collins attributes the easy conquest to the Lombard elite's "presupposition that rightful authority was in the hands of the one powerful enough to seize it". Charlemagne soon returned to Francia with the Lombard royal treasury and with Desiderius and his family, who would be confined to a monastery for the rest of their lives.

Frontier wars in Saxony and Spain
The Saxons took advantage of Charlemagne's absence in Italy to raid the Frankish borderlands, leading to a Frankish counter-raid in the autumn of 774 and a reprisal campaign the following year. Charlemagne was soon drawn back to Italy as Duke Hrodgaud of Friuli rebelled against him. He quickly crushed the rebellion, distributing Hrodgaud's lands to the Franks to consolidate his rule in Lombardy. Charlemagne wintered in Italy, consolidating his power by issuing charters and legislation and taking Lombard hostages. Amid the 775 Saxon and Friulian campaigns, his daughter Rotrude was born in Francia.

Returning north, Charlemagne waged another brief, destructive campaign against the Saxons in 776. This led to the submission of many Saxons, who turned over captives and lands and submitted to baptism. In 777, Charlemagne held an assembly at Paderborn with Frankish and Saxon men; many more Saxons came under his rule, but the Saxon magnate Widukind fled to Denmark to prepare for a new rebellion.

Also at the Paderborn assembly were representatives of dissident factions from al-Andalus (Muslim Spain). They included the son and son-in-law of Yusuf ibn Abd al-Rahman al-Fihri, the former governor of Córdoba ousted by Caliph Abd al-Rahman in 756, who sought Charlemagne's support for al-Fihri's restoration. Also present was Sulayman al-Arabi, governor of Barcelona and Girona, who wanted to become part of the Frankish kingdom and receive Charlemagne's protection rather than remain under the rule of Córdoba. Charlemagne, seeing an opportunity to strengthen the security of the kingdom's southern frontier and extend his influence, agreed to intervene. Crossing the Pyrenees, his army found little resistance until an ambush by Basque forces in 778 at the Battle of Roncevaux Pass. The Franks, defeated in the battle, withdrew with most of their army intact.

Building the dynasty
Charlemagne returned to Francia to greet his newborn twin sons, Louis and Lothair, who were born while he was in Spain; Lothair died in infancy. Again, Saxons had seized on the king's absence to raid. Charlemagne sent an army to Saxony in 779 while he held assemblies, legislated, and addressed a famine in Francia. Hildegard gave birth to another daughter, Bertha. Charlemagne returned to Saxony in 780, holding assemblies at which he received hostages from Saxon nobles and oversaw their baptism.

He and Hildegard traveled with their four younger children to Rome in the spring of 781, leaving Pepin and Charles at Worms, to make a journey first requested by Adrian in 775. Adrian baptised Carloman and renamed him Pepin, a name he shared with his half-brother. Louis and the newly-renamed Pepin were then anointed and crowned. Pepin was appointed king of the Lombards, and Louis king of Aquitaine. This act was not nominal, since the young kings were sent to live in their kingdoms under the care of regents and advisers. A delegation from the Byzantine Empress Irene met Charlemagne during his stay in Rome; Charlemagne agreed to betroth his daughter Rotrude to Irene's son, Emperor Constantine VI.

Hildegard gave birth to her eighth child, Gisela, during this trip to Italy. After the royal family's return to Francia, she had her final pregnancy and died from its complications on 30 April 783. The child, named after her, died shortly thereafter. Charlemagne commissioned epitaphs for his wife and daughter, and arranged for a Mass to be said daily at Hildegard's tomb. Charlemagne's mother Bertrada died shortly after Hildegard, on 12 July 783. Charlemagne was remarried to Fastrada, daughter of the East Frankish count Radolf, by the end of the year.

Saxon resistance and reprisal
In summer 782, Widukind returned from Denmark to attack the Frankish positions in Saxony. He defeated a Frankish army, possibly due to rivalry among the Frankish counts leading it. Charlemagne came to Verden after learning of the defeat, but Widukind fled before his arrival. Charlemagne summoned the Saxon magnates to an assembly and compelled them to turn prisoners over to him, since he regarded their previous acts as treachery. The annals record that Charlemagne had 4,500 Saxon prisoners beheaded in the massacre of Verden. Fried writes, "Although this figure may be exaggerated, the basic truth of the event is not in doubt", and Alessandro Barbero calls it "perhaps the greatest stain on his reputation." Charlemagne issued the Capitulatio de partibus Saxoniae, probably in the immediate aftermath of (or as a precursor of) the massacre. With a harsh set of laws which included the death penalty for pagan practices, the Capitulatio "constituted a program for the forced conversion of the Saxons" and was "aimed ... at suppressing Saxon identity".

Charlemagne's focus for the next several years would be on his attempt to complete the subjugation of the Saxons. Concentrating first in Westphalia in 783, he pushed into Thuringia in 784 as his son Charles the Younger continued operations in the west. At each stage of the campaigns, the Frankish armies seized wealth and carried Saxon captives into slavery. Unusually, Charlemagne campaigned through the winter instead of resting his army. By 785, he had suppressed the Saxon resistance and completely commanded Westphalia. That summer, he met Widukind and persuaded him to end his resistance. Widukind agreed to be baptised with Charlemagne as his godfather, ending this phase of the Saxon Wars.

Benevento, Bavaria, and Pepin's revolt
Charlemagne travelled to Italy in 786, arriving by Christmas. Aiming to extend his influence further into southern Italy, he marched into the Duchy of Benevento. Duke Arechis fled to a fortified position at Salerno before offering Charlemagne his fealty. Charlemagne accepted his submission and hostages, who included Arechis's son Grimoald. In Italy, Charlemagne also met with envoys from Constantinople. Empress Irene had called the 787 Second Council of Nicaea, but did not inform Charlemagne or invite any Frankish bishops. Charlemagne, probably in reaction to the perceived slight of the exclusion, broke the betrothal of his daughter Rotrude and Constantine VI.

After Charlemagne left Italy, Arechis sent envoys to Irene to offer an alliance; he suggested that she send a Byzantine army with Adalgis, the exiled son of Desiderus, to remove the Franks from power in Lombardy. Before his plans could be finalised, Aldechis and his elder son Romuald died of illness within weeks of each other. Charlemagne sent Grimoald back to Benevento to serve as duke and return it to Frankish suzerainty. The Byzantine army invaded, but were repulsed by the Frankish and Lombard forces.

As affairs were being settled in Italy, Charlemagne turned his attention to Bavaria. Bavaria was ruled by Duke Tassilo, Charlemagne's first cousin, who had been installed by Pepin the Short in 748. Tassilo's sons were also grandsons of Desiderius, and a potential threat to Charlemagne's rule in Lombardy. The neighbouring rulers had a growing rivalry throughout their reigns, but had sworn oaths of peace to each other in 781. In 784, Rotpert (Charlemagne's viceroy in Italy) accused Tassilo of conspiring with Widukind in Saxony and unsuccessfully attacked the Bavarian city of Bolzano. Charlemagne gathered his forces to prepare for an invasion of Bavaria in 787. Dividing the army, the Franks launched a three-pronged attack. Quickly realizing his poor position, Tassilo agreed to surrender and recognise Charlemagne as his overlord. The following year, Tassilo was accused of plotting with the Avars to attack Charlemagne. He was deposed and sent to a monastery, and Charlemagne absorbed Bavaria into his kingdom. Charlemagne spent the next few years based in Regensburg, largely focused on consolidating his rule of Bavaria and warring against the Avars. Successful campaigns against them were launched from Bavaria and Italy in 788, and Charlemagne led campaigns in 791 and 792.

Charlemagne gave Charles the Younger rule of Maine in Neustria in 789, leaving Pepin the Hunchback his only son without lands. His relationship with Himiltrude was now apparently seen as illegitimate at his court, and Pepin was sidelined from the succession. In 792, as his father and brothers were gathered in Regensburg, Pepin conspired with Bavarian nobles to assassinate them and install himself as king. The plot was discovered and revealed to Charlemagne before it could proceed; Pepin was sent to a monastery, and many of his co-conspirators were executed.

The early 790s saw a marked focus on ecclesiastical affairs by Charlemagne. He summoned a council in Regensburg in 792 to address the theological controversy over the adoptionism doctrine in the Spanish church and formulate a response to the Second Council of Nicea. The council condemned adoptionism as heresy and led to the production of the Libri Carolini, a detailed argument against Nicea's canons. In 794, Charlemagne called another council in Frankfurt. The council confirmed Regensburg's positions on adoptionism and Nicea, recognised the deposition of Tassilo, set grain prices, reformed Frankish coinage, forbade abbesses from blessing men, and endorsed prayer in vernacular languages. Soon after the council, Fastrada fell ill and died; Charlemagne married the Alamannian noblewoman Luitgard shortly afterwards.

Continued wars with the Saxons and Avars
Charlemagne gathered an army after the council of Frankfurt as Saxon resistance continued, beginning a series of annual campaigns which lasted through 799. The campaigns of the 790s were even more destructive than those of earlier decades, with the annal writers frequently noting Charlemagne "burning", "ravaging", "devastating", and "laying waste" the Saxon lands. Charlemagne forcibly removed a large number of Saxons to Francia, installing Frankish elites and soldiers in their place. His extended wars in Saxony led to his establishing his court in Aachen, which had easy access to the frontier. He built a large palace there, including a chapel which is now part of the Aachen Cathedral. Einhard joined the court at that time. Pepin of Italy (Carloman) engaged in further wars against the Avars in the south, which led to the collapse of their kingdom and the eastward expansion of Frankish rule.

Charlemagne also worked to expand his influence through diplomatic means during the 790s wars, focusing on the Anglo-Saxon kingdoms of Britain. Charles the Younger proposed a marriage pact with the daughter of King Offa of Mercia, but Offa insisted that Charlemagne's daughter Bertha also be given as a bride for his son. Charlemagne refused the arrangement, and the marriage did not take place. Charlemagne and Offa entered into a formal peace in 796, protecting trade and securing the rights of English pilgrims to pass through Francia on their way to Rome. Charlemagne was also the host and protector of several deposed English rulers who were later restored: Eadbehrt of Kent, Ecgberht, King of Wessex, and Eardwulf of Northumbria. Nelson writes that Charlemagne treated the Anglo-Saxon kingdoms "like satellite states," establishing direct relations with English bishops. Charlemagne also forged an alliance with Alfonso II of Asturias, although Einhard calls Alfonso his "dependent".

Coronation
After Leo III became pope in 795, he faced political opposition. His enemies accused him of a number of crimes and physically attacked him in April 799, attempting to remove his eyes and tongue. Leo escaped and fled north to seek Charlemagne's help. Charlemagne continued his campaign against the Saxons before breaking off to meet Leo at Paderborn in September. Hearing evidence from the pope and his enemies, he sent Leo back to Rome with royal legates who were instructed to reinstate the pope and conduct a further investigation. In August of the following year, Charlemagne made plans to go to Rome after an extensive tour of his lands in Neustria. Charlemagne met Leo in November near Mentana at the twelfth milestone outside Rome, the traditional location where Roman emperors began their formal entry into the city. Charlemagne presided over an assembly to hear the charges, but believed that no one could sit in judgement of the pope. Leo swore an oath on 23 December, declaring his innocence of all charges. At mass in St. Peter's Basilica on Christmas Day 800, Leo proclaimed Charlemagne emperor and crowned him. Charlemagne was the first reigning emperor in the west since the deposition of Romulus Augustulus in 476. His son, Charles the Younger, was anointed king by Leo at the same time.

Historians differ about the intentions of the imperial coronation, the extent to which Charlemagne was aware of it or participated in its planning, and the significance of the events for those present and for Charlemagne's reign. Contemporary Frankish and papal sources differ in their emphasis on, and representation of, events. Einhard writes that Charlemagne would not have entered the church if he knew about the pope's plan; modern historians have regarded his report as truthful or rejected it as a literary device demonstrating Charlemagne's humility. Collins says that the actions surrounding the coronation indicate that it was planned by Charlemagne as early as his meeting with Leo in 799, and Fried writes that Charlemagne planned to adopt the title of emperor by 798 "at the latest." During the years before the coronation, Charlemagne's courtier Alcuin referred to his realm as an Imperium Christianum ("Christian Empire") in which "just as the inhabitants of the Roman Empire had been united by a common Roman citizenship", the new empire would be united by a common Christian faith. This is the view of Henri Pirenne, who says that "Charles was the Emperor of the ecclesia as the Pope conceived it, of the Roman Church, regarded as the universal Church".

The Roman Empire remained a significant contemporary power in European politics for Leo and Charlemagne, especially in Italy. The Byzantines continued to hold a substantial portion of Italy, with their borders not far south of Rome. Empress Irene had seized the throne from her son Constantine VI in 797, deposing and blinding him. Irene, the first Byzantine empress, faced opposition in Constantinople because of her gender and her means of accession. One of the earliest narrative sources for the coronation, the Annals of Lorsch, presented a female ruler in Constantinople as a vacancy in the imperial title which justified Leo's coronation of Charlemagne. Pirenne disagrees, saying that the coronation "was not in any sense explained by the fact that at this moment a woman was reigning in Constantinople." Leo's main motivations may have been the desire to increase his standing after his political difficulties, placing himself as a power broker and securing Charlemagne as a powerful ally and protector. The Byzantine Empire's lack of ability to influence events in Italy and support the papacy were also important to Leo's position. According to the Royal Frankish Annals, Leo prostrated himself before Charlemagne after crowning him (an act of submission standard in Roman coronation rituals from the time of Diocletian). This account presents Leo not as Charlemagne's superior, but as the agent of the Roman people who acclaimed Charlemagne as emperor.

Historian Henry Mayr-Harting claims that the assumption of the imperial title by Charlemagne was an effort to incorporate the Saxons into the Frankish realm, since they did not have a native tradition of kingship. However, Costambeys et al. note in The Carolingian World that "since Saxony had not been in the Roman empire it is hard to see on what basis an emperor would have been any more welcomed." These authors write that the decision to take the title of emperor was aimed at furthering Charlemagne's influence in Italy, as an appeal to traditional authority recognised by Italian elites within and (especially) outside his control.

Collins agrees that becoming emperor gave Charlemagne "the right to try to impose his rule over the whole of [Italy]", considering this a motivation for the coronation. He notes the "element of political and military risk" inherent in the affair due to the opposition of the Byzantine Empire and potential opposition from the Frankish elite, as the imperial title could draw him further into Mediterranean politics. Collins sees several of Charlemagne's actions as attempts to ensure that his new title had a distinctly-Frankish context.

Charlemagne's coronation led to a centuries-long ideological conflict between his successors and Constantinople known as the problem of two emperors, which could be seen as a rejection or usurpation of the Byzantine emperors' claim to be the universal, preeminent rulers of Christendom. Historian James Muldoon writes that Charlemagne may have had a more limited view of his role, seeing the title as representing dominion over lands he already ruled. However, the title of emperor gave Charlemagne enhanced prestige and ideological authority. He immediately incorporated his new title into documents he issued, adopting the formula "Charles, most serene Augustus, crowned by God, great peaceful emperor governing the Roman empire, and who is by the mercy of God king of the Franks and the Lombards" instead of the earlier form "Charles, by the grace of God king of the Franks and Lombards and patrician of the Romans." The avoidance of the specific claim of being a "Roman emperor", as opposed to the more-neutral "emperor governing the Roman empire", may have been to improve relations with the Byzantines. This formulation (with the continuation of his earlier royal titles) may also represent a view of his role as emperor as being the ruler of the people of the city of Rome, as he was of the Franks and the Lombards.

Governing the empire
Charlemagne left Italy in the summer of 801 after adjudicating several ecclesiastical disputes in Rome, and never returned to the city. Continuing trends and a ruling style established in the 790s, Charlemagne's reign from 801 onward is a "distinct phase" characterised by more sedentary rule from Aachen. Although conflict continued until the end of his reign, the relative peace of the imperial period allowed for attention on internal governance. The Franks continued to wage war, though these wars were defending and securing the empire's frontiers, and Charlemagne rarely led armies personally. A significant expansion of the Spanish March was achieved with a series of campaigns by Louis against the Emirate of Cordoba, culminating in the 801 capture of Barcelona.

The 802 Capitulare missorum generale was an expansive piece of legislation, with provisions governing the conduct of royal officials and requiring that all free men take an oath of loyalty to Charlemagne. The capitulary reformed the institution of the missi dominici, officials who would now be assigned in pairs (a cleric and a lay aristocrat) to administer justice and oversee governance in defined territories. The emperor also ordered the revision of the Lombard and Frankish legal codes.

In addition to the missi, Charlemagne also ruled parts the empire with his sons as sub-kings. Although Pepin and Louis had some authority as kings in Italy and Aquitaine, Charlemagne had the ultimate authority and directly intervened. Charles, their elder brother, had been given lands in Neustria in 789 or 790 and made a king in 800.

The 806 charter Divisio Regnorum (Division of the Realm) set the terms of Charlemagne's succession. Charles, as his eldest son in good favour, was given the largest share of the inheritance: rule of Francia, Saxony, Nordgau, and parts of Alemannia. The two younger sons were confirmed in their kingdoms and gained additional territories; most of Bavaria and Alemmannia was given to Pepin, and Provence, Septimania, and parts of Burgundy were given to Louis. Charlemagne did not address the inheritance of the imperial title. The Divisio also provided that if any of the brothers predeceased Charlemagne, their sons would inherit their share; peace was urged among his descendants.

Conflict and diplomacy with the east
After his coronation, Charlemagne sought recognition of his imperial title from Constantinople. Several delegations were exchanged between Charlemagne and Irene in 802 and 803. According to the contemporary Byzantine chronicler Thophanes, Charlemagne made an offer of marriage to Irene which she was close to accepting. Irene was deposed and replaced by Nikephoros I, who was unwilling to recognise Charlemagne as emperor. The two empires conflicted over control of the Adriatic Sea (especially Istria and Veneto) several times during Nikephoros' reign. Charlemagne sent envoys to Constantinople in 810 to make peace, giving up his claims to Veneto. Nikephoros died in battle before the envoys could leave Constantinople but his son-in-law and successor Michael I confirmed the peace, sending his own envoys to Aachen to recognise Charlemagne as emperor. Charlemagne soon issued the first Frankish coins bearing his imperial title, although papal coins minted in Rome had used the title as early as 800.

He sent envoys and initiated diplomatic contact with the Abbasid caliph Harun al-Rashid during the 790s, due to their mutual interest in Spanish affairs. As an early sign of friendship, Charlemagne requested an elephant as a gift from Harun. Harun later provided an elephant named Abul-Abbas, which arrived at Aachen in 802. Harun also sought to undermine Charlemagne's relations with the Byzantines, with whom he was at war. As part of his outreach, Harun gave Charlemagne nominal rule of the Church of the Holy Sepulchre in Jerusalem and other gifts. According to Einhard, Charlemagne "zealously strove to make friendships with kings beyond the seas" in order "that he might get some help and relief to the Christians living under their rule." A surviving administrative document, the Basel roll, shows the work done by his agents in Palestine in furtherance of this goal.

Harun's death lead to a succession crisis and, under his successors, churches and synagogues were destroyed in the caliphate. Unable to intervene directly, Charlemagne sent specially-minted coins and arms to the eastern Christians to defend and restore their churches and monasteries. The coins with their inscriptions were also an important tool of imperial propaganda. Johannes Fried writes that deteriorating relations with Baghdad after Harun's death may have been the impetus for renewed negotiations with Constantinople which led to Charlemagne's peace with Michael in 811.

As emperor, Charlemagne became involved in a religious dispute between Eastern and Western Christians over the recitation of the Niceno-Constantinopolitan Creed, the fundamental statement of orthodox Christian belief. The original text of the creed, adopted at the Council of Constantinople, professed that the Holy Spirit proceeded from the Father. A tradition developed in Western Europe that the Holy Spirit proceeded from the Father "and the Son", inserting the Latin term filioque into the creed. The difference did not cause significant conflict until 807, when Frankish monks in Bethlehem were denounced as heretics by a Greek monk for using the filioque form. The Frankish monks appealed the dispute to Rome, where Pope Leo affirmed the text of the creed omitting the phrase and passed the report on to Charlemagne. Charlemagne summoned a council at Aachen in 809 which defended the use of filioque, and sent the decision to Rome. Leo said that the Franks could maintain their tradition, but asserted that the canonical creed did not include filioque. He commissioned two silver shields with the creed in Latin and Greek (omitting the filioque), which he hung in St. Peter's Basilica. Another product of the 809 Aachen council was the Handbook of 809, an illustrated calendrical and astronomical compendium.

Wars with the Danes
Scandinavia had been brought into contact with the Frankish world through Charlemagne's wars with the Saxons. Raids on Charlemagne's lands by the Danes began around 800. Charlemagne engaged in his final campaign in Saxony in 804, seizing Saxon territory east of the Elbe, removing its Saxon population, and giving the land to his Obotrite allies. The Danish king Gudfred, uneasy at the extension of Frankish power, offered to meet with Charlemagne to arrange peace and (possibly) hand over Saxons who had fled to him; the talks were unsuccessful.

The northern frontier was quiet until 808, when Gudfred and some allied Slavic tribes led an incursion into the Obotrite lands and extracted tribute from over half the territory. Charles the Younger led an army across the Elbe in response, but only attacked some of Gudfred's Slavic allies. Gudfred again attempted diplomatic overtures in 809, but no peace was apparently made. Danish pirates raided Frisia in 810, although it is uncertain if they were connected to Gudfred. Charlemagne sent an army to secure Frisia while he led a force against Gudfred, who had reportedly challenged the emperor to face him in battle. The battle never took place, since Gudfred was murdered by two of his own men before Charlemagne's arrival. Gudfred's nephew and successor Hemming immediately sued for peace, and a commission led by Charlemagne's cousin Wala reached a settlement with the Danes in 811. The Danes did not pose a threat for the remainder of Charlemagne's reign, but the effects of this war and their earlier expansion in Saxony helped set the stage for the intense Viking raids across Europe later in the ninth century.

Final years and death
The Carolingian dynasty experienced a number of losses in 810 and 811, when Charlemagne's sister Gisela, his daughter Rotrude, and his sons Pepin the Hunchback, Pepin of Italy, and Charles the Younger died. The deaths of Charles and Pepin of Italy left Charlemagne's earlier plans for succession in disarray. He declared Pepin of Italy's son Bernard ruler of Italy and made his own only surviving son, Louis, heir to the rest of the empire. Charlemagne also made a new will detailing the disposal of his property at his death, with bequests to the church, his children, and his grandchildren. Einhard (possibly relying on tropes from Suetonius's The Twelve Caesars) says that Charlemagne viewed the deaths of his family members, his fall from a horse, astronomical phenomena, and the collapse of part of the palace in his last years as signs of his impending death. Charlemagne continued to govern with energy during his final year, ordering bishops to assemble in five ecclesiastical councils. These culminated in a large assembly at Aachen, where Charlemagne crowned Louis as his co-emperor and Bernard as king in a ceremony on 11 September 813.

Charlemagne became ill in the autumn of 813 and spent his last months praying, fasting, and studying the gospels. He developed pleurisy, and was bedridden for seven days before dying on the morning of 28 January 814. Thegan, a biographer of Louis, records the emperor's last words as "Into your hands, Lord, I commend my spirit" (quoting from ). Charlemagne's body was prepared and buried in the chapel at Aachen by his daughters and palace officials that day. Louis arrived at Aachen thirty days after his father's death, making a formal adventus and taking charge of the palace and the empire. Charlemagne's remains were exhumed by Holy Roman Emperor Frederick Barbarossa in 1165, and reinterred in a new casket by Frederick II in 1215.

Political legacy
The stability and peace of Charlemagne's reign did not long outlive him. Louis' reign was marked by strife, including a number of rebellions by his sons. After Louis' death, the empire was divided among his sons into West, East, and Middle Francia by the Treaty of Verdun. Middle Francia was divided several more times over the course of subsequent generations. Carolingians would rule – with some interruptions – in East Francia (later the Kingdom of Germany) until 911, and in West Francia (which would become France) until 987. After 887, the imperial title was held sporadically by a series of non-dynastic Italian rulers before it lapsed in 924. The East Francian king Otto the Great conquered Italy, and was crowned emperor in 962. Otto founded the Holy Roman Empire, which would last until its dissolution in 1806.

According to historian Jennifer Davis, Charlemagne "invented medieval rulership" and his influence can be seen at least into the nineteenth century. Charlemagne is often known as "the father of Europe" because of the influence of his reign and the legacy he left across the large area of the continent he ruled. The political structures he established remained in place through his Carolingian successors, and continued to exert influence into the eleventh century.

Charlemagne is considered an ancestor of several European ruling houses, including the Capetian dynasty, the Ottonian dynasty, the House of Luxembourg, the House of Ivrea and the House of Habsburg. The Ottonians and Capetians, direct successors of the Carolingans, drew on the legacy of Charlemagne to bolster their legitimacy and prestige; the Ottonians and their successors held their German coronations in Aachen through the Middle Ages. The marriage of Philip II of France to Isabella of Hainault (a direct descendant of Charlemagne) was seen as a sign of increased legitimacy for their son, Louis VIII, and the French kings' association with Charlemagne's legacy was stressed until the monarchy's end. German and French rulers, such as Frederick Barbarossa and Napoleon, cited the influence of Charlemagne and associated themselves with him.

The city of Aachen has, since 1949, awarded an international prize (the Karlspreis der Stadt Aachen) in honour of Charlemagne. It is awarded annually to those who promote European unity. Recipients of the prize include Richard von Coudenhove-Kalergi (founder of the pan-European movement), Alcide De Gasperi, and Winston Churchill.

Carolingian Renaissance
Contacts with the wider Mediterranean world through Spain and Italy, the influx of foreign scholars at court, and the relative stability and length of Charlemagne's reign led to a cultural revival known as the Carolingian Renaissance. Although the beginnings of this revival can be seen under his predecessors, Charles Martel and Pepin, Charlemagne took an active and direct role in shaping intellectual life which led to the revival's zenith. Charlemagne promoted learning as a matter of policy and direct patronage, with the aim of creating a more effective clergy. The Admonitio generalis and Epistola de litteris colendis outlined his policies and aims for education.

Intellectual life at court was dominated by Irish, Anglo-Saxon, Visigothic and Italian scholars, including Dungal of Bobbio, Alcuin of York, Theodulf of Orléans, and Peter of Pisa; Franks such as Einhard and Angelbert also made substantial contributions. Aside from the intellectual activity at the palace, Charlemagne promoted ecclesiastical schools and publicly-funded schools for the children of the elite and future clergy. Students learned basic Latin literacy and grammar, arithmetic, and other subjects of the medieval liberal arts. From their education, it was expected that even rural priests could provide their parishioners with basic instruction in religious matters and (possibly) the literacy required for worship. Latin was standardised and its use brought into territories well beyond the former Roman Empire, forming a second language community of speakers and writers and sustaining Latin creativity in the Middle Ages.

Carolingian authors produced extensive works, including legal treatises, histories, poetry, and religious texts. Scriptoria in monasteries and cathedrals focused on copying new and old works, producing an estimated 90,000 manuscripts during the ninth century. The Carolingian minuscule script was developed and popularised in medieval copying, influencing Renaissance and modern typefaces. Scholar John J. Contreni considers the educational and learning revival under Charlemagne and his successors "one of the most durable and resilient elements of the Carolingian legacy".

Memory and historiography
Charlemagne was a frequent subject of, and inspiration for, medieval writers after his death. Einhard's Vita Karoli Magni, according to Johannes Fired, "can be said to have revived the defunct literary genre of the secular biography." Einhard drew on classical sources, such as Suetonius' The Twelve Caesars, the orations of Cicero, and Tacitus' Agricola to frame his work's structure and style. The Carolingian period also saw a revival of the mirrors for princes genre. The author of the Latin poem Visio Karoli Magni, written c. 865, uses facts (apparently from Einhard) and his own observations on the decline of Charlemagne's family after their civil wars later in the ninth century as the bases of a visionary tale about Charles meeting a prophetic spectre in a dream. Notker's Gesta Karoli Magni, written for Charlemagne's great-grandson Charles the Fat, presents moral anecdotes (exempla) to highlight the emperor's qualities as a ruler.

Charlemagne, as a figure of myth and emulation, grew over the centuries; Matthias Becher writes that over 1,000 legends are recorded about him, far outstripping subsequent emperors and kings. Later medieval writers depicted Charlemagne as a crusader and Christian warrior. Charlemagne is the main figure of the medieval literary cycle known as the Matter of France. Works in this cycle, which originated during the Crusades, centre on characterisations of the emperor as a leader of Christian knights in wars against Muslims. The cycle includes chansons de geste (epic poems) such as the Song of Roland and chronicles such as the Historia Caroli Magni, also known as the (Pseudo-)Turpin Chronicle. Charlemagne was depicted as one of the Nine Worthies, a fixture in medieval literature and art as an exemplar of a Christian king.

Attention to Charlemagne became more scholarly in the early modern period as Eindhard's Vita and other sources began to be published. Political philosophers debated his legacy; Montesquieu viewed him as the first constitutional monarch and protector of freemen, but Voltaire saw him as a despotic ruler and representative of the medieval period as a Dark Age. As early as the sixteenth century, debate between German and French writers began about Charlemagne's "nationality". These contrasting portraits – a French Charlemagne versus a German Karl der Große – became especially pronounced during the nineteenth century with Napoleon's use of Charlemagne's legacy and the rise of German nationalism. German historiography and popular perception focused on the Massacre of Verden, emphasised with Charlemagne as the "butcher" of the Germanic Saxons or downplayed as an unfortunate part of the legacy of a great German ruler. Propaganda in Nazi Germany initially portrayed Charlemagne as an enemy of Germany, a French ruler who worked to take away the freedom and native religion of the German people. This quickly shifted as Adolf Hitler endorsed a portrait of Charlemagne as a great unifier of disparate German tribes into a common nation, allowing Hitler to co-opt Charlemagne's legacy as an ideological model for his expansionist policies.

Historiography after World War II focused on Charlemagne as "the father of Europe" rather than a nationalistic figure, a view first advanced during the nineteenth century by German romantic philosopher Friedrich Schlegel. This view has led to Charlemagne's adoption as a political symbol of European integration. Modern historians increasingly place Charlemagne in the context of the wider Mediterranean world, following the work of Henri Pirenne.

Religious impact and veneration
Charlemagne gave much attention to religious and ecclesiastical affairs, holding 23 synods during his reign. His synods were called to address specific issues at particular times, but generally dealt with church administration and organization, education of the clergy, and the proper forms of liturgy and worship. Charlemagne used the Christian faith as a unifying factor in the realm and, in turn, worked to impose unity on the church. He implemented an edited version of the Dionysio-Hadriana book of canon law acquired from Pope Adrian, required use of the Rule of St. Benedict in monasteries throughout the empire, and promoted a standardised liturgy adapted from the rites of the Roman Church to conform with Frankish practices. Carolingian policies promoting unity did not eliminate the diverse practices throughout the empire, but created a shared ecclesiastical identity – according to Rosamond McKitterick, "unison, not unity."

The condition of all his subjects as a "Christian people" was an important concern. Charlemagne's policies encouraged preaching to the laity, particularly in vernacular languages they would understand. He believed it essential to be able to recite the Lord's Prayer and the Apostles' Creed, and made efforts to ensure that the clergy taught them and other basics of Christian morality.

ThomasF.X.Noble writes that the efforts of Charlemagne and his successors to standardise Christian doctrine and practices and harmonise Frankish practices were essential steps in the development of Christianity in Europe, and the Roman Catholic or Latin Church "as a historical phenomenon, not as a theological or ecclesiological one, is a Carolingian construction." He says that the medieval European concept of Christendom as an overarching community of Western Christians, rather than a collection of local traditions, is the result of Carolingian policies and ideology. Charlemagne's doctrinal policies promoting the use of filioque and opposing the Second Council of Nicea were key steps in the growing divide between Western and Eastern Christianity.

Emperor Otto II attempted to have Charlemagne canonised in 1000. In 1165, Frederick Barbarossa persuaded Antipope Paschal III to elevate Charlemagne to sainthood. Since Paschal's acts were not considered valid, Charlemagne was not recognised as a saint by the Holy See. Despite this lack of official recognition, his cult was observed in Aachen, Reims, Frankfurt, Zurich and Regensburg, and he has been venerated in France since the reign of Charles V.

Charlemagne also drew attention from figures of the Protestant Reformation, with Martin Luther criticising his apparent subjugation to the papacy by accepting his coronation from Leo. John Calvin and other Protestant thinkers viewed him as a forerunner of the Reformation, however, noting the Libri Carolini condemnation of the worship of images and relics and conflicts by Charlemagne and his successors with the temporal power of the popes.

Wives, concubines, and children
Wives and their children
 * Himiltrude (768–770)
 * Pepin the Hunchback (c. 769/770–811)
 * Desiderata, daughter of Desiderius, king of the Lombards (m. 770–771)
 * Hildegard (m. 771–783) daughter of Gerold of Anglachgau
 * Charles the Younger (c. 772/773–811), Duke of Maine
 * Adalhaid (773/4–774), born while her parents were on campaign in Italy. She was sent back to Francia, but died before reaching Lyons
 * Rotrude (or Hruodrud) (c. 775–810)
 * Carloman, renamed Pepin (777–810), King of Italy
 * Louis (778–840), King of Aquitaine since 781, crowned co-emperor in 813, senior Emperor from 814
 * Lothair (778–779/780), twin of Louis, he died in infancy
 * Bertha (779/780–826)
 * Gisela (b. 782)
 * Hildegard (782–783)
 * Fastrada (m. 783–794)
 * Theodrada (b. 785), Abbess of Argenteuil
 * Hiltrude (b. 787, d. after 808)
 * Luitgard (m. 794–800)

Concubines and their children
 * Gersuinda
 * Adaltrude
 * Madelgard
 * Ruodhaid (d. 852), Abbess of Faremoutiers
 * Regina
 * Drogo (801–855), Bishop of Metz
 * Hugh (c. 802–844), archchancellor of the Empire
 * Adallind
 * Theodoric (b. 807)
 * Unknown partners
 * Hroudhaid (b. 784)
 * Richbod (805–844), Abbot of Saint-Riquier
 * Bernard (fl. 843), Abbot of Moutiers-Saint-Jean Abbey
 * Chrothais (d 814)

Charlemagne had at least twenty children with his wives and other partners. After the death of his wife Luitgard in 800, he did not remarry but had children with unmarried partners. He was determined that all his children, including his daughters, should receive an education in the liberal arts. His children were taught in accordance with their aristocratic status, which included training in riding and weaponry for his sons and embroidery, spinning and weaving for his daughters.

Rosamond McKitterick writes that Charlemagne exercised "a remarkable degree of patriarchal control ... over his progeny," noting that only a handful of his children and grandchildren were raised outside his court. Pepin of Italy and Louis reigned as kings from childhood and lived at their courts. Careers in the church were arranged for his illegitimate sons. His daughters were resident at court or at Chelles Abbey (where Charlemagne's sister was abbess), and those at court may have fulfilled the duties of queen after 800.

Louis and Pepin of Italy married and had children during their father's lifetime, and Charlemagne brought Pepin's daughters into his household after Pepin's death. Rotrude had been betrothed to Emperor Constantine VI, but the betrothal was ended. None of Charlemagne's daughters married, although several had children with unmarried partners. Bertha had two sons, Nithard and Hartnid, with Charlemagne's courtier Angilbert; Rotrude had a son named Louis, possibly with Count Rorgon; and Hiltrude had a son named Richbod, possibly with a count named Richwin. The Divisio Regnorum issued by Charlemagne in 806 provided that his legitimate daughters be allowed to marry or become nuns after his death. Theodrada entered a convent, but the decisions of his other daughters are unknown.

Appearance and iconography
Einhard gives a first-hand description of Charlemagne's appearance later in life:

"He was heavily built, sturdy, and of considerable stature, although not exceptionally so, since his height was seven times the length of his own foot. He had a round head, large and lively eyes, a slightly larger nose than usual, white but still attractive hair, a bright and cheerful expression, a short and fat neck, and he enjoyed good health, except for the fevers that affected him in the last few years of his life."

Charlemagne's tomb was opened in 1861 by scientists who reconstructed his skeleton and measured it at 1.92 m in length, roughly equivalent to Einhard's seven feet. A 2010 estimate of his height from an X-ray and CT scan of his tibia was 1.84 m; this puts him in the 99th percentile of height for his period, given that average male height of his time was 1.69 m. The width of the bone suggested that he was slim.

Charlemagne wore his hair short, abandoning the Merovingian tradition of long-haired monarchs. He had a moustache (possibly imitating the Ostrogothic king Theoderic the Great), in contrast with the bearded Merovingian kings; future Carolingian monarchs would adopt this style. Paul Dutton notes the ubiquitous crown in portraits of Charlemagne and other Carolingian rulers, replacing the earlier Merovingian long hair. A ninth-century statuette depicts Charlemagne or his grandson, Charles the Bald and shows the subject as moustachioed with short hair; this also appears on contemporary coinage.

By the twelfth century, Charlemagne was described as bearded rather than moustachioed in literary sources such as the Song of Roland, the Pseudo-Turpin Chronicle, and other works in Latin, French, and German. The Pseudo-Turpin uniquely says that his hair was brown. Later art and iconography of Charlemagne followed suit, generally depicting him in a later medieval style as bearded with longer hair.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: Charlemagne


text:
Character encodings in HTML

While Hypertext Markup Language (HTML) has been in use since 1991, HTML 4.0 from December 1997 was the first standardized version where international characters were given reasonably complete treatment. When an HTML document includes special characters outside the range of seven-bit ASCII, two goals are worth considering: the information's integrity, and universal browser display.

Specifying the document's character encoding
There are two general ways to specify which character encoding is used in the document.

First, the web server can include the character encoding or " " in the Hypertext Transfer Protocol (HTTP)  header, which would typically look like this: This method gives the HTTP server a convenient way to alter document's encoding according to content negotiation; certain HTTP server software can do it, for example Apache with the module.

Second, a declaration can be included within the document itself.

For HTML it is possible to include this information inside the  element near the top of the document:

HTML5 also allows the following syntax to mean exactly the same:

XHTML documents have a third option: to express the character encoding via XML declaration, as follows:

With this second approach, because the character encoding cannot be known until the declaration is parsed, there is a problem knowing which character encoding is used in the document up to and including the declaration itself. If the character encoding is an ASCII extension then the content up to and including the declaration itself should be pure ASCII and this will work correctly. For character encodings that are not ASCII extensions (i.e. not a superset of ASCII), such as UTF-16BE and UTF-16LE, a processor of HTML, such as a web browser, should be able to parse the declaration in some cases through the use of heuristics.

Encoding detection algorithm
As of HTML5 the recommended charset is UTF-8. An "encoding sniffing algorithm" is defined in the specification to determine the character encoding of the document based on multiple sources of input, including:
 * 1) Explicit user instruction
 * 2) An explicit meta tag within the first 1024 bytes of the document
 * 3) A byte order mark (BOM) within the first three bytes of the document
 * 4) The HTTP Content-Type or other transport layer information
 * 5) Analysis of the document bytes looking for specific sequences or ranges of byte values, and other tentative detection mechanisms.

Characters outside of the printable ASCII range (32 to 126) usually appear incorrectly. This presents few problems for English-speaking users, but other languages regularly—in some cases, always—require characters outside that range. In Chinese, Japanese, and Korean (CJK) language environments where there are several different multi-byte encodings in use, auto-detection is also often employed. Finally, browsers usually permit the user to override incorrect charset label manually as well.

It is increasingly common for multilingual websites and websites in non-Western languages to use UTF-8, which allows use of the same encoding for all languages. UTF-16 or UTF-32, which can be used for all languages as well, are less widely used because they can be harder to handle in programming languages that assume a byte-oriented ASCII superset encoding, and they are less efficient for text with a high frequency of ASCII characters, which is usually the case for HTML documents.

Successful viewing of a page is not necessarily an indication that its encoding is specified correctly. If the page's creator and reader are both assuming some platform-specific character encoding, and the server does not send any identifying information, then the reader will nonetheless see the page as the creator intended, but other readers on different platforms or with different native languages will not see the page as intended.

Permitted encodings
The WHATWG Encoding Standard, referenced by recent HTML standards (the current WHATWG HTML Living Standard, as well as the formerly competing W3C HTML 5.0 and 5.1) specifies a list of encodings which browsers must support. The HTML standards forbid support of other encodings. The Encoding Standard further stipulates that new formats, new protocols (even when existing formats are used) and authors of new documents are required to use UTF-8 exclusively.

Besides UTF-8, the following encodings are explicitly listed in the HTML standard itself, with reference to the Encoding Standard: • ISO-8859-2

• ISO-8859-7

• ISO-8859-8

• Windows-874

• Windows-1250

• Windows-1251

• Windows-1252

• Windows-1254

• Windows-1255

• Windows-1256

• Windows-1257

• Windows-1258

• GB 18030

• Big5

• Shift JIS

• ISO-2022-JP

• EUC-KR

• UTF-16BE

• UTF-16LE

• x-user-defined

The following additional encodings are listed in the Encoding Standard, and support for them is therefore also required: • Code page 866

• ISO-8859-3

• ISO-8859-4

• ISO-8859-5

• ISO-8859-6

• ISO-8859-8-

• ISO-8859-10

• ISO-8859-13

• ISO-8859-14

• ISO-8859-15

• ISO-8859-16

• KOI8-R

• KOI8-U / KOI8-RU

• Mac OS Roman

• Windows-1253

• Mac OS Cyrillic

• GBK

• EUC-JP

The following encodings are listed as explicit examples of forbidden encodings: • CESU-8

• UTF-7

• BOCU-1

• SCSU

• EBCDIC

• UTF-32

The standard also defines a "replacement" decoder, which maps all content labelled as certain encodings to the replacement character (�), refusing to process it at all. This is intended to prevent attacks (e.g. cross site scripting) which may exploit a difference between the client and server in what encodings are supported in order to mask malicious content. Although the same security concern applies to ISO-2022-JP and UTF-16, which also allow sequences of ASCII bytes to be interpreted differently, this approach was not seen as feasible for them since they are comparatively more frequently used in deployed content. The following encodings receive this treatment: • ISO-2022-KR

• ISO-2022-CN

• ISO-2022-CN-EXT

• HZ-GB-2312

Character references
In addition to native character encodings, characters can also be encoded as character references, which can be numeric character references (decimal or hexadecimal) or character entity references. Character entity references are also sometimes referred to as named entities, or HTML entities for HTML. HTML's usage of character references derives from SGML.

HTML character references
A numeric character reference in HTML refers to a character by its Universal Character Set/Unicode code point, and uses the format

or

where nnnn is the code point in decimal form, and hhhh is the code point in hexadecimal form. The x must be lowercase in XML documents. The nnnn or hhhh may be any number of digits and may include leading zeros. The hhhh may mix uppercase and lowercase, though uppercase is the usual style.

Not all web browsers or email clients used by receivers of HTML documents, or text editors used by authors of HTML documents, will be able to render all HTML characters. Most modern software is able to display most or all of the characters for the user's language, and will draw a box or other clear indicator for characters they cannot render.

For codes from 0 to 127, the original 7-bit ASCII standard set, most of these characters can be used without a character reference. Codes from 160 to 255 can all be created using character entity names. Only a few higher-numbered codes can be created using entity names, but all can be created by decimal number character reference.

Character entity references can also have the format  where name is a case-sensitive alphanumeric string. For example, "λ" can also be encoded as  in an HTML document. The character entity references,  ,   and   are predefined in HTML and SGML, because  ,  ,    and   are already used to delimit markup. This notably did not include XML's  (') entity prior to HTML5. For a list of all named HTML character entity references along with the versions in which they were introduced, see List of XML and HTML character entity references.

Unnecessary use of HTML character references may significantly reduce HTML readability. If the character encoding for a web page is chosen appropriately, then HTML character references are usually only required for markup delimiting characters as mentioned above, and for a few special characters (or none at all if a native Unicode encoding like UTF-8 is used). Incorrect HTML entity escaping may also open up security vulnerabilities for injection attacks such as cross-site scripting. If HTML attributes are left unquoted, certain characters, most importantly whitespace, such as space and tab, must be escaped using entities. Other languages related to HTML have their own methods of escaping characters.

XML character references
Unlike traditional HTML with its large range of character entity references, in XML there are only five predefined character entity references. These are used to escape characters that are markup sensitive in certain contexts:

All other character entity references have to be defined before they can be used. For example, use of  (which gives é, Latin lower-case E with acute accent, U+00E9 in Unicode) in an XML document will generate an error unless the entity has already been defined. XML also requires that the  in hexadecimal numeric references be in lowercase: for example   rather than. XHTML, which is an XML application, supports the HTML entity set, along with XML's predefined entities.

title: Character encodings in HTML