text:
Lady Mary Wortley Montagu

Lady Mary Wortley Montagu (née Pierrepont; 15 May 1689 –21 August 1762) was an English aristocrat, medical pioneer, writer, and poet. Born in 1689, Lady Mary spent her early life in England. In 1712, Lady Mary married Edward Wortley Montagu, who later served as the British ambassador to the Sublime Porte. Lady Mary joined her husband on the Ottoman excursion, where she was to spend the next two years of her life. During her time there, Lady Mary wrote extensively on her experience as a woman in Ottoman Constantinople. After her return to England, Lady Mary devoted her attention to the upbringing of her family before dying of cancer in 1762.

Although having regularly socialised with the court of George I and George Augustus, Prince of Wales (later King George II), Lady Mary is today chiefly remembered for her letters, particularly her Turkish Embassy Letters describing her travels to the Ottoman Empire, as wife to the British ambassador to Turkey, which Billie Melman describes as "the very first example of a secular work by a woman about the Muslim Orient". Aside from her writing, Mary is also known for introducing and advocating smallpox inoculation in Britain after her return from Turkey. Her writings address and challenge some contemporary social attitudes towards women and their intellectual and social growth at that time.

Early life
Lady Mary Pierrepont was born on 15 May 1689 at Holme Pierrepont Hall in Nottinghamshire, and baptised on 26 May 1689 at St. Paul's Church in Covent Garden, London. She was the eldest child of Evelyn Pierrepont, 1st Duke of Kingston-upon-Hull (c.1655–1726), and his first wife Lady Mary Feilding (died 20 December 1697), the only daughter of the third Earl of Denbigh (1640–1685). Lady Mary had three younger siblings: two girls, Frances and Evelyn, and a boy, William.

Lady Mary was a bright, free-spirited child who dreamed of greatness. She wrote in her diary, "I am going to write a history so uncommon." Aged seven, members of the newly formed Kit-Cat Club, a group of fashionable men, nominated her as the subject of their toast to the beauty of the season, and they had her name engraved on the glass goblet used for this purpose. As a child, she had a "desire of catching the setting sun" and she would run across the meadow to "catch hold of the great golden ball of fire sinking on the horizon". However, she then realized that this activity "was impossible". Overall, the pursuit of achieving the impossible became a recurring pattern throughout her life.

However, misfortune occurred – her mother, who she thought would have supported her aspirations, died. Then her paternal grandmother Elizabeth Pierrepont raised Mary and her siblings until she died when Mary was eight years old. Then, after Mrs. Pierrepont's death, Mary was passed to the care of her father, who did not believe he was obliged to assist with her education.

Education
Mary Wortley Montagu's education was divided between a governess and the use of the library at the family property Thoresby Hall. According to Lady Mary, the governess gave her "one of the worst [educations] in the world" by teaching Lady Mary "superstitious tales and false notions". To supplement the instruction of a despised governess, Lady Mary used the well-furnished library to "steal" her education by hiding in the library, between 10am and 2pm, and "every afternoon from four to eight". She taught herself Latin, a language usually reserved for men at the time. She secretly got a hold of a "Latin dictionary and grammar" and by the age of thirteen, her handling with the language was on par to most men. Furthermore, she was also a voracious reader. She jotted the list of characters and titles she read into a notebook. Some of the works she read included "plays of Beaumont and Fletcher, Dryden, Rowe, Lee, Otway" and French and English romances, including "Grand Cyrus, Pharamond, Almahide, and Parthenissa." By 1705, at the age of fourteen or fifteen, Mary Pierrepont had written two albums entitled "Poems, Songs &c" filled with poetry, a brief epistolary novel, and a prose-and-verse romance modelled after Aphra Behn's Voyage to the Isle of Love (1684). She also corresponded with two bishops, Thomas Tenison and Gilbert Burnet, who supplemented the instruction of the governess. Overall, Mary impressed her father, who was not a scholar, with her progress.

Engagement
By 1710, Lady Mary had two possible suitors to choose from: Edward Wortley Montagu (born 8 February 1678) and Clotworthy Skeffington. The friendship between Lady Mary and Edward Wortley Montagu, the son of Sidney Wortley Montagu, began through Edward's younger sister Anne Wortley. In London, Anne and Lady Mary met frequently at social functions and exchanged visits to each other's homes. They also communicated through writing, in which they filled their letters with "trivial gossip" and "effusive compliments". After Anne died in November 1709, Lady Mary began conversing with Anne's brother Edward Wortley Montagu. Lady Mary often met Edward at "friends' houses" and "at Court". On 28 March 1710, she wrote the first letter she addressed to Edward. Lady Mary corresponded with Edward Wortley Montagu via letters until 2 May 1711 without her father's permission.

Keeping up with their communication became harder when Lady Mary's father bought a house at Acton, a suburban village famous for its mineral springs. Lady Mary hated the house because it was 'dull and disagreeable,' and it did not have a library in it. A few weeks after moving, Lady Mary had the measles, and she asked her maid to write Edward a letter to tell him about the illness. Soon, there were misunderstandings between Edward and Lady Mary. Edward hurried to Acton. There, he left a note, revealing his love: "I should be overjoyed to hear your Beauty is very much impaired, could I be pleased with anything that would give you displeasure, for it would lessen the number of Admirers." In response, she scolded his indiscretion by saying, "Forgive and forget me." Then, in his reply, Edward stated that "he would deal with her father if he were sure they could be happy together." This reply helped Lady Mary forget her irritation. Lady Mary in Acton and Edward in London kept writing to each other until the early summer of 1710.

Lady Mary's primary concern with her engagement was financial, not romantic. Lady Mary denied transient emotions guiding her life: "I can esteem, I can be a friend, but I don't know whether I can love." Then, after setting forth all her terms, including her deference, she warned to Edward that "Make no answer to this, if you can like me on my own terms" and that his proposals not be made for her. However, these correspondences soon endangered Edward. In one particular letter, Edward wrote, "Her being better in 1710, the consequence of its being known that I write to her." A servant in Lady Mary's household found this letter and gave it to her father; this letter put her father "in the utmost rage." However, Wortley was flattered that Lady Mary "had given the father as 'an artifice to bring the affair to a proper conclusion.'" The next day, Wortley called Lady Mary's father about a formal proposal. Mary's father, now Marquess of Dorchester had insisted on one condition in the marriage contract: "that Wortley's estate be entailed on the first son born to him." However, Wortley refused to do this as it would require £10,000.

Consequently, in order to convince Lady Mary's father, Edward thought of publishing the marriage contract in the Tatler, a British journal. On the Tatler's issue of 18 July, Wortley wrote the following: "Her first lover has ten to one against him. The very hour after he has opened his heart and his rent rolls he is made no other use of but to raise her price…While the poor lover very innocently waits, till the plenipotentiaries at the inns of court have debated about the alliance, all the partisans of the lady throw difficulties in the way, till other offers come in; and the man who came first is not put in possession, until she has been refused by half the town." These arguments did not persuade Lord Dorchester. Even though these negotiations reached an impasse, Lady Mary and Edward continued corresponding with one another.

At the end of March 1711, Lady Mary's father 'determined to end her friendship with Wortley'. Her father summoned her to a conference, forced her to promise to not to write, and hustled her to West Dean. However, Lady Mary broke her promise to tell Wortley about her rights and duty: "Had you had any real Affection for me, you would have long go applied yourself to him, from whose hand only you can receive me." After their exchanges of disagreements and realizing she did not like him, he realized their friendship must end. On 2 May, he replied, "Adieu, Dearest L[ady] M[ary]. This once be assur’d you will not deceive me. I expect no answer." Consequently, Lady Mary did not respond that summer. In that same summer, her father Lord Dorchester decided to find a husband other than Edward Wortley Montagu for his daughter.

Lady Mary's father pressured her to marry Clotworthy Skeffington, the heir to the Irish Viscount Massereene. Skeffington's marriage contract included "an allowance of £500 a year as 'pin-money,' and £1,200 a year if he died." However, she rejected him. Thus, to avoid marriage to Skeffington, she eloped with Montagu. In a letter to Wortley, she wrote, "He [my father] will have a thousand plausible reasons for being irreconcilable, and ‘tis very probable the world will be on his side…I shall come to you with only a night-gown and petticoat, and that is all you will get with me. I told a lady of my friends what I intended to do. You will think her a very good friend when I tell you she has proffered to lend us her house if we would come there the first night…If you determine to go to that lady's house, you had better come with a coach and six at seven o’clock to-morrow." The marriage license is dated 17 August 1712, and the marriage probably took place on 23 August 1712.

Early married life before travelling to the Ottoman Empire
Lady Mary Wortley Montagu and Edward Wortley Montagu spent the first years of their married life in England. She had a son, Edward Wortley Montagu the younger, named after his father Edward Wortley Montagu, on 16 May 1713, in London. On 13 October 1714, her husband accepted the post of Junior Commissioner of the Treasury. When Lady Mary joined him in London, her wit and beauty soon made her a prominent figure at court. She was among the society of George I and George Augustus, Prince of Wales, and counted amongst her friends Molly Skerritt, Lady Walpole, John, Lord Hervey, Mary Astell, Sarah Churchill, Duchess of Marlborough, Alexander Pope, John Gay, and Abbé Antonio Schinella Conti.

In December 1715, at the age of twenty-six, Lady Mary contracted smallpox. She survived, but while she was ill someone circulated the satirical "court eclogues" she had been writing. One of the poems was read as an attack on Caroline, Princess of Wales, in spite of the fact that the "attack" was voiced by a character who was herself heavily satirised.

Husband's assignment to Constantinople

In 1716, Edward Wortley Montagu was appointed Ambassador at Constantinople to negotiate an end to the Austro-Turkish War. In August 1716, Lady Mary accompanied him to Vienna, and thence to Adrianople and Constantinople. He was recalled in 1717, but they remained at Constantinople until 1718. While away from England, the Wortley Montagus had a daughter on 19 January 1718, who would grow up to be Mary, Countess of Bute. After an unsuccessful delegation between Austria and the Ottoman Empire, they set sail for England via the Mediterranean, and reached London on 2 October 1718. In the same year, the Austrians and Turkish signed the Treaty of Passarowitz at the conclusion of the Austro-Turkish War.

The story of this voyage and of her observations of Eastern life is told in Letters from Turkey, a series of lively letters full of graphic descriptions; Letters is often credited as being an inspiration for subsequent female travelers and writers, as well as for much Orientalist art. During her visit she was sincerely charmed by the beauty and hospitality of the Ottoman women she encountered. In letters she wrote about how different fashion was as she made her way to Turkey. In a letter to Lady Mar, from Vienna, she wrote: "They build certain fabrics of gauze on their heads, about a yard high, consisting of three or four stories, fortified with numberless yards of heavy ribbon…Their whalebone petticoats outdo ours by several yards' circumference, and cover some acres of ground." Furthermore, she recorded her experiences in a Turkish bath, which are reserved for both diversion and health. In a letter, she wrote, "They [Ottoman women] generally take this diversion once a week, and stay there at least four or five hours, without getting cold immediately coming out of the hot bath into the cold room, which was surprising to me." She also recorded a particularly amusing incident in which a group of Turkish women at a bath in Sofia, horrified by the sight of the stays she was wearing, exclaimed that "they believed I was so locked up in that machine that it was not in my own power to open it, which contrivance they attributed to my husband." Lady Mary wrote about the misconceptions that previous travelers, specifically male travelers, had recorded about the religion, traditions and the treatment of women in the Ottoman Empire. Her gender and class status provided her with access to female spaces that were closed off to males. Her personal interactions with Ottoman women enabled her to provide, in her view, a more accurate account of Turkish women, their dress, habits, traditions, limitations and liberties, at times irrefutably more a critique of the Occident than a praise of the Orient. Montagu also carefully constructed Ottoman female spaces, and her own engagement with Ottoman women, as full of homoerotic desire, which is consistent with the gender and sexual fluidity that characterized much of her life and writings.

Smallpox inoculation
In the 18th century, Europeans began an experiment known as inoculation or variolation to prevent, not cure the smallpox. Lady Mary Wortley Montagu defied convention, most memorably by promoting smallpox inoculation to Western medicine after witnessing it during her travels and stay in the Ottoman Empire. Previously, Lady Mary's brother had died of smallpox in 1713, and although Lady Mary recovered from the disease in 1715, it left her with a disfigured face. In the Ottoman Empire, she visited the women in their segregated zenanas, a house for Muslims and Hindus, making friends and learning about Turkish customs. There in March 1717, she witnessed the practice of inoculation against smallpox – variolation – which she called engrafting, and wrote home about it in a number of her letters. The most famous of these letters was her "Letter to a Friend" of 1 April 1717. Variolation used live smallpox virus in the pus taken from a mild smallpox blister and introduced it into scratched skin of the arm or leg (the most usual spots) of a previously uninfected person to promote immunity to the disease. Consequently, the inoculate would develop a milder case of smallpox than the one he/she might have contracted.

Lady Mary was eager to spare her children, thus, in March 1718 she had her nearly five-year-old son, Edward, inoculated there with the help of Embassy surgeon Charles Maitland. In fact, her son was the "first English person to undergo the operation." In a letter to a friend in England, Montagu wrote, "There is a set of old women [here], who make it their business to perform the operation, every autumn…when then great heat is abated…thousands undergo this operation...[and there] is not one example of anyone that has died in it." Afterwards, she updated the status of Edward to her husband: "The Boy was engrafted last Tuesday, and is at this time singing and playing, and very impatient for his supper. I pray God my next may give as good an account of him." On her return to London, she enthusiastically promoted the procedure, but encountered a great deal of resistance from the medical establishment, because it was a folk treatment process.

In April 1721, when a smallpox epidemic struck England, she had her daughter inoculated by Maitland, the same physician who had inoculated her son at the Embassy in Turkey, and publicised the event. This was the first such operation done in England. She persuaded Caroline of Ansbach, the Princess of Wales, to test the treatment. In August 1721, seven prisoners at Newgate Prison awaiting execution were offered the chance to undergo variolation instead of execution: they all survived and were released. Despite this, controversy over smallpox inoculation intensified. However Caroline, Princess of Wales, was convinced of its value. The Princess's two daughters Amelia and Caroline were successfully inoculated in April 1722 by French-born surgeon Claudius Amyand. In response to the general fear of inoculation, Lady Mary, under a pseudonym, wrote and published an article describing and advocating in favour of inoculation in September 1722. Later, other royal families soon followed Montagu's act. For instance, in 1768, Catherine the Great of Russia had herself and her son, the future Tsar Paul, inoculated. The Russians continued to refine the process.

Nevertheless, inoculation was not always a safe process; inoculates developed a real case of smallpox and could infect others. The inoculation resulted in a "small number of deaths and complications, including serious infections." Subsequently, Edward Jenner, who was 13 years old when Lady Mary died in 1762, developed the much safer technique of vaccination using cowpox instead of smallpox. Jenner's method involves "engrafting lymph taken from a pustulate of cowpox on the hand of a milkmaid into the arm of an inoculate." Jenner first tested his method on James Phipps, an eight-year-old boy, and when Phipps did not have any reaction after the procedure, Jenner claimed that his procedure "bestowed immunity against smallpox." Then, after spending the next few years experimenting his new procedure, he discovered that his hypothesis was correct. As vaccination gained acceptance, variolation gradually fell out of favour. In the 20th century, a concerted campaign by the WHO to eradicate smallpox via vaccination would succeed by 1979. Lady Mary Wortley Montagu's introduction of smallpox inoculation had ultimately led to the development of vaccines, and the later eradication of smallpox.

Later years

After returning to England, Lady Mary took less interest in court compared to her earlier years. Instead, she was more focused on the upbringing of her children, reading, writing, and editing her travel letters—which she then chose not to publish.

Before starting for the East, Lady Mary Wortley Montagu had met Alexander Pope, and during her Embassy travels with her husband, they wrote each other a series of letters. While Pope may have been fascinated by her wit and elegance, Lady Mary's replies to his letters reveal that she was not equally smitten. Very few letters passed between them after Lady Mary's return to England, and various reasons have been suggested for the subsequent estrangement. In 1728, Pope attacked Lady Mary in his Dunciad, which inaugurated a decade in which most of his publications made some sort of allegation against her.

Difficulties with family
Lady Mary went through a series of trials with her children. In 1726 and 1727, Lady Mary's son Edward ran away from Westminster School several times. He was then entrusted to a tutor with strict orders to keep him abroad. In later years, her son managed to return to England without permission and continued to have a strained relationship with both his parents.

In the summer of 1736, Lady Mary's daughter, also named Mary, fell in love with John Stuart, 3rd Earl of Bute, but he had little fortune; Lady Mary warned her daughter about the disadvantages of living in poverty. Lady Mary similarly had concerns regarding the 1734 marriage of her niece Lady Mary Pierrrepont (1711-1795) who had eloped with Philip Meadows, Deputy Ranger of Richmond Park saying that her "ruin"  was due to the "silly good people that had the care of her".

In August 1736, Lady Mary's daughter married Bute, despite her parents' disapproval of the match. Later, Lady Mary wrote to Lord Gower, 1st Earl Gower, about her daughter's disobedience. In response, Lord Gower tried to console Lady Mary: "I hope by her future conducts she will atone for her past, and that choice will prove more happy than you and Mr. Wortley expect." In the same year, she met and fell in love with Count Francesco Algarotti, who competed with an equally smitten John Hervey for her affections.

Lady Mary wrote many letters to Francesco Algarotti in English and in French after his departure from England in September 1736. In July 1739, Lady Mary departed England without her husband ostensibly for health reasons, possibly from a disfiguring skin disease, and declared her intentions to winter in the south of France; after she left England, she and her husband never met again. In reality, she left to visit and live with Algarotti in Venice. Their relationship ended in 1741 after Lady Mary and Algarotti were both on a diplomatic mission in Turin. Lady Mary stayed abroad and travelled extensively. After travelling to Venice, Florence, Rome, Genoa and Geneva, she finally settled in Avignon in 1742. She left Avignon in 1746 for Brescia, where she fell ill and stayed for nearly a decade, leaving for Lovere in 1754. In the summer of 1756, Lady Mary travelled to Venice for an undisclosed business errand. After August 1756, she resided in Venice and Padua and saw Algarotti again in November. Throughout the time, Lady Mary exchanged letters with her daughter, Lady Bute, discussing topics such as philosophy, literature, and the education of girls, as well as conveying details of her geographical and social surroundings.

Lady Mary received news of her husband Edward Wortley Montagu's death on 1 January 1761, and he was buried at Wortley. As soon as she learned of her husband's death, Lady Mary left Venice for England. She had a self-imposed exile because of her strained relationship with, but her return made sense because she wanted to see her daughter and her grandchildren before she died. On 1 September 1761, she began her journey back home; she decided to go through Germany and Holland because France, which was deemed the easier route, was at war. However, the journey was dangerous and exhausting. When she reached Augsburg on 1 October, she wrote to Sir James and Lady Francis Steuart that "she hoped to meet them in Holland." She recorded her perils and fatigues to Sir James in a letter: "I am dragging my ragged remnant of life to England. The wind and the tide are against me; how far I have strength to struggle against both, I know not." While detained at Rotterdam, she handed her Embassy Letters to the Reverend Benjamin Sowden of Rotterdam, for safe keeping and "to be dispos'd of as he thinks proper." After she left Rotterdam on 12 December, a hard, impenetrable frost hindered her voyage. Towards the end of the month, she sailed for England, but a mountainous sea obstructed the passage and the captain returned to harbor. On the next attempt a few days later, Lady Mary reached London in January 1762. After arriving in London, Lady Mary rented a house in Great George Street, Hanover Square, and her daughter and grandchildren often visited her.

In June 1762, it became known that Lady Mary was suffering from cancer. Even though she tried to conceal her illness from her family as long as possible, she grew rapidly weaker that month. She wrote her last letter but with difficulty on 2 July to Lady Frances Steuart; in this letter, she wrote "I have been ill a long time, and am now so bad I am little capable of writing, but I would not pass in your opinion as either stupid or ungrateful. My heart is always warm in your service, and I am always told your affairs shall be taken care of." Lady Frances's son was in London, and when he visited Lady Mary's house, he was summoned to her bedroom where he was surrounded by her relatives, including Lord and Lady Bute. Lady Mary then ordered her relatives to leave the room, saying of Lady Frances's son, "My dear young friend has come to see me before I die, and I desire to be left alone with him." She died on 21 August 1762 at her house in Great George Street, and was buried in Grosvenor Chapel the day after she died.

Important works and literary place

Although Lady Mary Wortley Montagu is now best known for her Turkish Embassy Letters, she wrote poetry and essays as well. A number of Lady Mary's poems and essays were printed in her lifetime, either without or with her permission, in newspapers, in miscellanies, and independently.

Montagu did not intend to publish her poetry, but it did circulate widely, in manuscript, among members of her own social circle. Lady Mary was highly suspicious of any idealizing literary language. She wrote most often in heroic couplets, a serious poetic form to employ, and, according to Susan Staves, "excelled at answer poems". Some of her widely anthologized poems include "Constantinople" and "Epistle from Mrs. Yonge to her Husband". "Constantinople", written in January 1718, is a beautiful poem in heroic couplets describing Britain and Turkey through human history, and representing the states of mind "of knaves, coxcombs, the mob, and party zealous—all characteristic of the London of her time". "Epistle from Mrs. Yonge to her Husband", written in 1724, stages a letter from Mrs. Yonge to her libertine husband and exposes the social double standard which led to the shaming and distress of Mrs. Yonge after her divorce. In 1737 and 1738, Lady Mary published anonymously a political periodical called the Nonsense of Common-Sense, supporting the Robert Walpole government. The title was a reference to a journal of the liberal opposition entitled Common Sense. She wrote six Town Eclogues and other poems.

During the twentieth century Lady Mary's letters were edited separately from her essays, poems and plays. She wrote notable letters describing her travels through Europe and the Ottoman Empire; these appeared after her death in three volumes. Lady Mary corresponded with Anne Wortley and wrote courtship letters to her future husband Edward Wortley Montagu, as well as love letters to Francesco Algarotti. She corresponded with notable writers, intellectuals and aristocrats of her day. She wrote gossip letters and letters berating the vagaries of fashionable people to her sister, Lady Mar, the daughter of the Whig Duke of Kingston. They met when the Wortleys visited Paris, France on 29 September 1718. During her visit, Montagu observed the beauties and behaviors of Parisian women. She wrote "their hair cut short and curled round their faces, loaded with powder that makes it look like white wool!" In one of their correspondences, Lady Mary informed her sister of the 'surprising death' of her father. Furthermore, they exchanged intellectual letters with Montagu's only daughter, Lady Bute. Lady Mary and Lady Mar discontinued their correspondence in 1727. Although not published during her lifetime, her letters from Turkey were clearly intended for print. She revised them extensively and gave a transcript to the Reverend Benjamin Sowden, a British clergyman, in Rotterdam in 1761. Sowden also lent the book to two English travelers, including Thomas Becket. Furthermore, during that night, the travelers made copies of her letters. After the travelers returned the book, Sowden handed the book to Lord Bute, the husband of Lady Mary's only daughter, in exchange for two hundred pounds. In 1763 in London, the year after Montagu's death, Becket and De Hondt published this error-laden version manuscript in three volumes, entitled ''Letters of the Right Honourable Lady My W—y Me: Written, during her Travels in Europe, Asia and Africa, to Persons of Distinction, Men of Letters, &c. in different Parts of Europe; Which contain, Among other curious Relations, Accounts of the Policy and Manners of the Turks, commonly referred to as the Embassy Letters or Turkish Embassy Letters because it was "composed during and after Montagu's journey through Europe to Constantinople in the company of her husband." The first edition of the book sold out; in fact, the Critical Review'' newspaper editor, Tobias Smollett, wrote that the letters were "never equaled by any letter-writer of any sex, age or nation" and Voltaire also had high praise of these letters. Four years later in 1767, editor John Cleland added five spurious letters, along with previous printed essays and verses, to the previous edition of the book.

Despite the immediate success following the publication of Turkish Embassy Letters, Lady Bute was furious and worried about how an unauthorized publication would impact the family's reputation. One of the manuscript volumes that others found was Lady Mary's famous diary, and Lady Bute did not have any knowledge of this existence until a few days before her mother's death. After she received these volumes, Lady Bute "kept it always under lock and key, and though she often looked over it herself, and read passages aloud to her daughters and friends, excepting the first five or six copy-books, which at a late period, she permitted Lady Louisa Stuart to peruse alone, upon condition that nothing should be transcribed." Lady Louisa Stuart, the youngest of Lady Bute's daughters, was scolded for reading books and wanting to be like her grandmother. Later, Lady Louisa followed her grandmother's footsteps and became a writer. Then when Lady Bute felt that the end of her life was near, in 1794, she burnt the diary that her mother kept since her marriage. She chose to burn the diary because Lady Bute always spoke to her mother with great respect, and she feared the possibility of a scandal.

According to O'Quinn, although The Turkish Embassy Letters has been considered one of the best literary works published in the eighteenth century, the work has not been as appreciated as those published by her male peers, such as Alexander Pope and Horace Walpole. She was the "target of vicious attacks" from printing presses and male peers. Although she describes her travels through Europe to the Ottoman Empire in The Turkish Embassy Letters to her correspondents, very few of the letters survived, and the letters in the book may not be accurate transcriptions of the actual correspondence. According to Daniel O'Quinn, the book was not a culmination of facts but of opinions, and there must be some filtering during the editing processes. Furthermore, to avoid public censure, Montagu used pseudonyms, such as "a Turkey merchant" and "Lady President", in her publications. Lastly, Montagu’s The Turkish Embassy Letters was published posthumously-Walpole affirmed that it was Montagu’s deathbed wish to get the letters published.

An important early letter was published, probably without Montagu's consent, titled "The Genuine Copy of a Letter Written From Constantinople by an English Lady" in 1719. Both in this letter and in the Turkish Embassy Letters more broadly, particularly in the letters about the scholar Achmet Beg, Montagu participates in a wider English dialogue on Enlightenment ideas about religion, particularly deism, and their overlap with Islamic theology. Montagu, along with many others, including the freethinking scholar Henry Stubbe, celebrated Islam for what they saw as its rational approach to theology, for its strict monotheism, and for its teaching and practice around religious tolerance. In short, Montagu and other thinkers in this tradition saw Islam as a source of Enlightenment, as evidenced in her calling the Qur'an "the purest morality delivered in the very best language" By comparison, Montagu dedicated large portions of the Turkish Embassy Letters to criticizing Catholic religious practices, particularly Catholic beliefs around sainthood, miracles, and religious relics, which she frequently excoriated. In relation to these practices, she wrote, "I cannot fancy there is anything new in letting you know that priests can lie, and the mob believe all over the world."

Montagu's Turkish letters were to prove an inspiration to later generations of European women travellers and writers. In particular, Montagu staked a claim to the authority of women's writing, due to their ability to access private homes and female-only spaces where men were not permitted. The title of her published letters is "Sources that Have Been Inaccessible to Other Travellers". The letters themselves frequently draw attention to the fact that they present a different, and Montagu asserts more accurate description than that provided by previous (male) travellers: "You will perhaps be surpriz'd at an Account so different from what you have been entertained with by the common Voyage-writers who are very fond of speaking of what they don't know." In general, Montagu dismisses the quality of European travel literature of the 18th century as nothing more than "trite observations…superficial…[of] boys [who] only remember where they met with the best wine or the prettiest women". Montagu writes about the "warmth and civility" of Ottoman women. She describes the hammam, known to her readers as a 'Turkish bath', "as a space of urbane homosociality, free of cruel satire and disdain". She mentions that "hammam are remarkable for their undisguised admiration of the women's beauty and demeanor", which creates a space for female authority. Montagu provides an intimate description of the women's bathhouse in Sofia, in which she derides male descriptions of the bathhouse as a site for unnatural sexual practices, instead insisting that it was "the Women's coffee house, where all the news of the Town is told, Scandal invented, etc." Montagu's reference to "women's coffee house" represents the political and social freedom that women had access to in the Ottoman Empire during the 18th century. Even though Montagu refused to undress for the bath at first, the girls managed to persuade her to "open my shirt, and show them my stays, which satisfied them very well". In one letter to her sister Lady Mar, she wrote, "nothing will surprise you more than the sight of my person, as I am now in my Turkish habit."

During Montagu's time in the Ottoman Empire, she saw and wrote extensively concerning the practise of slavery along with the treatment of slaves by the Turks. Montagu wrote many letters with positive descriptions of the various enslaved people that she saw in the elite circles of Istanbul, including eunuchs and large collections of serving and dancing girls dressed in expensive outfits. In one of her letters written back home, famously from the interior of a bath house, she dismisses the idea that slaves of the Ottoman elite should be figures to be pitied. In response to her visit to the slave market in Istanbul, she wrote "you will imagine me half a Turk when I don't speak of it with the same horror other Christians have done before me, but I cannot forbear applauding the humanity of the Turks to those creatures. They are never ill-used, and their slavery is in my opinion no worse than servitude all over the world."

Montagu's Turkish letters were frequently cited by Western female travellers, more than a century after her journey. Such writers cited Montagu's assertion that women travellers could gain an intimate view of Turkish life that was not available to their male counterparts. However, they also added corrections or elaborations to her observations.

In 1739, a book was printed by an unknown author under the pseudonym "Sophia, a person of quality", titled Woman not Inferior to Man. This book is often attributed to Lady Mary.

Her Letters and Works were published in 1837. Montagu's octogenarian granddaughter Lady Louisa Stuart contributed to this, anonymously, an introductory essay titled "Biographical Anecdotes of Lady M. W. Montagu", from which it was clear that Stuart was troubled by her grandmother's focus on sexual intrigues and did not see Lady Mary Wortley Montagu's Account of the Court of George I at his Accession as history. However, Montagu's historical observations, both in the "Anecdotes" and the Turkish Embassy Letters, prove quite accurate when put in context. Despite the availability of her work in print and the revival efforts of feminist scholars, the complexity and brilliance of Lady Mary Wortley Montagu's extensive body of work has not yet been recognized to the fullest.

Book reviews

 * Prescott, Sarah. Lady Mary Wortley Montagu: Comet of the Enlightenment, Isobel Grundy 1999. Review of English Studies, New Series, Vol. 51, No. 202 (May 2000), pp. 300–303.

title: Lady Mary Wortley Montagu


text:
Edward Wortley Montagu (traveller)

Edward Wortley Montagu (15 May 1713 – 29 April 1776) was an English author and traveller.

He was the son of the diplomat and member of parliament Edward Wortley Montagu and the writer and traveller Lady Mary Wortley Montagu, whose talent and eccentricity he seems to have inherited. In 1716, he was taken by his parents to Constantinople, and at Pera in March 1716-17 was inoculated for smallpox, the first native of the United Kingdom to undergo this medical procedure.

On the return of his parents to England in 1718, he was placed at Westminster School, from which he ran away more than once. On the first occasion, in July 1726, he was traced to Oxford, and was with difficulty 'reduced to the humble condition of a school-boy.' He decamped again in August 1727 and was not recovered for some months. Two similar escapades are mentioned by his tutor, Forster, chaplain to the Duchess of Kingston, but without dates. The first ended in his discovery, after a year's absence, selling fish in Blackwall. The second time, he worked his passage out to Oporto, deserted, went up country, and found employment in the vineyards, but returning to Oporto in charge of some asses, he was arrested at the instance of the British consul, brought back to his ship, identified and restored to his parents by the master.

He was then sent to travel with a tutor in the West Indies, and afterwards with a keeper to the Netherlands. He made a serious study of Arabic at Leiden in 1741 and returned many years later to prosecute his studies. His father made him a meagre allowance, and he was heavily encumbered with debt.

He served in the British army from 1743 to 1748, first as a cornet in the 7th Dragoon Guards and later as a captain-lieutenant in the 1st Regiment of Foot. He fought at the Battle of Fontenoy. He left the army in 1748. He thereafter traveled in various parts for many years, writing brief diary notes of his travels along with occasional sketches; and finally returned to his studies in 1769.

He was Member of Parliament (MP) for Huntingdonshire in 1747 and was one of the secretaries at the conference of Aix-la-Chapelle that closed the War of the Austrian Succession in 1748. In 1751, he was involved in a disreputable gaming quarrel in Paris; arrested for cheating a Jew at cards and then robbing him when he refused to pay; and was imprisoned for eleven days in the Châtelet. He was cleared after the first court hearing before the decision was overturned by the Parlement of Paris, and he was ordered to pay a fine of 300 livres. He continued to sit in parliament, and wrote Reflections on the Rise and Fall of the Antient Republics ... (1759). Whilst in Italy, he designed and published a detailed map of the Ambracian Gulf and the island of Lefkas in northwestern Greece. His father left him an annuity of £1000, the bulk of the property going to his sister Lady Bute.

He set out for extended travel in the East, and George Romney described him as living in the Turkish manner at Venice. Fluent in Hebrew, Arabic, Chaldaic, and Persian, he was also an excellent orator. His family thought him mad, and his mother left him a single guinea in her will, but her annuity devolved on him at her death. He died at Padua in Italy.

Further references

 * Isobel Grundy, "Edward Wortley Montagu", Oxford Dictionary of National Biography (subscription)
 * Finding aid to Edward Wortley Montagu papers at Columbia University. Rare Book & Manuscript Library.
 * Finding aid to Edward Wortley Montagu papers at Columbia University. Rare Book & Manuscript Library.
 * Finding aid to Edward Wortley Montagu papers at Columbia University. Rare Book & Manuscript Library.

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

title: Edward Wortley Montagu (traveller)


text:
Prince of Persia 2: The Shadow and the Flame

Prince of Persia 2: The Shadow and the Flame is a 1993 cinematic platform game released by Broderbund for the MS-DOS, and later ported to Macintosh, Super NES, and FM Towns. It is the second installment in the Prince of Persia series, and a direct sequel to 1989's Prince of Persia. Both games were designed by Jordan Mechner, but unlike the original, he did not program the sequel himself. In the game, players control the Prince as he attempts to return to Persia and defeat the evil wizard Jaffar once and for all, who has assumed his appearance, seized the throne, and put his love interest, the Princess, under a death spell.

Despite being ported to a smaller range of platforms than the first game, Prince of Persia 2 was also a commercial success, and was regarded by most contemporary reviewers as an improvement over its predecessor. The final installment in the original Prince of Persia trilogy, Prince of Persia 3D, was released in 1999. An updated version of the game for iOS and Android was released in 2013 without the "2" in the title.

Gameplay
Similar to the first Prince of Persia, the character explores various deadly areas by running, jumping, crawling, avoiding traps, solving puzzles and drinking magic potions. Prince of Persia 2 is more combat-heavy than its predecessor. In the first game, enemies appear only occasionally and are always alone, while in the sequel, up to four enemies may appear at once, sometimes flanking the player, and may even be instantly replaced by reinforcements when they are killed. As in Prince of Persia, the goal is to complete the game under a strict time limit from 75 minutes (which start after a certain point in game) that passes in real time. Lives are unlimited, but time cannot be regained (except by reverting to a previously saved game). In other areas, more significant improvements have been made. The graphics are far more complex than the simple look of the game's predecessor, the areas explored are larger, and the variety of backdrops is greater.

Plot
The game takes place eleven days after the events of the first game. During this period, the Prince was hailed as a hero who defeated the evil Jaffar. He turns down all riches and instead asks for the Princess' hand in marriage as his reward, to which the Sultan of Persia reluctantly agrees. The game begins as the Prince enters the royal courts of the palace. Before he enters, his appearance changes into that of a beggar. Nobody recognizes him and, when he attempts to speak with the Princess, a man who shares his appearance (Jaffar, who is magically disguised) emerges from the shadows, ordering him to be thrown out. With guards pursuing him, the Prince jumps through a window and flees the city by way of a ship.

Falling asleep on the ship, the Prince dreams of a mysterious woman who asks the Prince to come to her. At this time, the ship is struck by lightning, cast by Jaffar. When the Prince regains consciousness, he finds himself on the shore of a foreign island. He comes to a cave full of reanimated human skeletons that fight him. He finally escapes on a magic carpet. In the meantime, in Persia, Jaffar seizes the throne in the guise of the Prince. The Princess falls ill under Jaffar's spell of gradual death.

The magic carpet takes the Prince to the ruins of Basra filled with screaming flying goblin heads, snakes and traps. Arriving at what appears to have once been a throne room, the Prince loses consciousness after touching a sword on the ground and has another vision. The mysterious woman, revealed to be his mother, appears again. She explains that the Prince is of a royal lineage, the only survivor of the massacre by "armies of darkness" after his parents sacrificed their own lives to save him, and that the sword belonged to his father. She implores him to take the sword and avenge the fallen.

The Prince rides a magical horse to a red temple, inhabited by warrior monks wearing bird headdresses. There, he finds that the shadow, created in the events of the original game, can now leave his body at his will. He wields his shadow to obtain the magic flame of the temple, at which point the bird warriors kneel before him. He flies back to Persia on the magic horse and confronts Jaffar. With the shadow and the flame, the Prince burns Jaffar, killing him for good.

With Jaffar's spell broken, the Princess awakens and the couple rejoice with their love for each other. The Prince orders the scattering of Jaffar's ashes. The game ends on a cliffhanger when an old witch is shown watching the happy couple through a crystal ball. According to Jordan Mechner, the plot of the old witch and the "armies of darkness" were set to be resolved in a sequel, which never came.

Ports
Titus Software ported the game to the Super NES and released it in 1996. It has some missing features and lacks several levels, including the last one. In August 2006, the Sega Genesis port was leaked. Ported by Microïds, this conversion was going to be published by Psygnosis, as depicted in the leaked version, but was canceled in an almost complete state for unknown reasons.

The game can also be unlocked in the Xbox NTSC version of Prince of Persia: The Sands of Time by finding a secret area. The GameCube, PlayStation 2 and Xbox PAL versions feature the original Prince of Persia instead and the Windows version lacks the secret area entirely. The Macintosh version has high resolution graphics (640×480), the MS-DOS and SNES version only low resolution graphics (320×200) and (256×224) respectively.

In July 2013, a remake of the game was made available for iOS and Android mobile devices which is developed by Ubisoft Pune. The game includes options for both virtual buttons and gesture-based controls. It is currently available on the Samsung Galaxy app store but has been removed from Google Play Store without any clarification from Google.

Reception
According to Jordan Mechner, Prince of Persia 2 was a commercial success, with sales of 750,000 units by 2000.

Charles Ardai wrote in Computer Gaming World that "Prince of Persia 2 not only is in every dimension better than Prince of Persia, but ... is the cruelest, most infuriating, least merciful—in short, the best—game of its type I have ever played", with "an appeal that is absolutely irresistible". He criticized the imperfect savegame feature that forced him to replay areas dozens of times, and other aspects of gameplay, but concluded that the game "merits nothing but salaam after salaam ... a virtuoso performance by Mechner, one of the field's most devious puzzle constructors". Power Play gave both the DOS and Macintosh versions a 68% score. Computer and Video Games gave the PC version a 92% score.

Prince of Persia 2 won Computer Gaming World's "Action Game of the Year" award in June 1994. The editors wrote that it "certainly surpasses its predecessor", and called it a "smoothly animated horizontal scrolling thriller with cinematic scope, vivid action and daunting puzzles".

Coach Kyle of GamePro gave the Super NES version a mixed review. He criticized the black outlines on the characters and the weak sound effects, but praised the eerie music and the quality of the challenge, deeming it "a tough thinking-gamer's game". Power Unlimited gave the PC version a score of 70% writing: "The sequel to the classic Prince of Persia has just as smooth animations and beautiful sounds, but eventually falls short because the levels are less well designed than in the original and the puzzles have become too difficult."


text:
Talk:Newline

Flat file vs. Text processing / Desktop publishing
The article currently describes only the usage in text files/flat files. Somebody should add a section about Text processing/Desktop publishing as well. User:ScotXW t@lk 12:25, 17 December 2017 (UTC)

Merge
Please discuss merging this article with End-of-line in the "Merge?" section. — Preceding unsigned comment added by Chris Chittleborough (talk • contribs) 06:54, 6 September 2006 (UTC)

 * Not that there's anything to discuss any more, as the merger has been done. Guy Harris (talk) 06:23, 23 August 2017 (UTC)

Examples to convert line endings
There are examples how sed works with line endings. Those are examples which work only with some variants of sed, but require a non-posix compliant sed (but like available on most linux). E.g. http://www.grymoire.com/Unix/Sed.html#uh-nl - the variant described here e.g. don't work with the versions shipped with MacOSX. — Preceding unsigned comment added by 195.4.206.111 (talk • contribs) 20:28, 22 September 2009 (UTC)

1958 version of ASCII
This requires further explanation, because of an apparent contradiction with "1960 Originated what have become the ASCII and ISO character codes." on http://www.unt.edu/isrc/Faculty/FacultyFellows/bemer.htm, and with the material on http://www.bobbemer.com. Also, http://homepages.cwi.nl/~dik/english/codes/stand.html says that the first standardised version dates from 1963. — Preceding unsigned comment added by 213.119.232.254 (talk • contribs) 16:13, 13 December 2003 (UTC (UTC)

AIX
AIX is a Unix variant after all. Does it really follow OS/360?? Yaron 21:47, Aug 2, 2004 (UTC)
 * OS/360 and Unix have nothing in common except that OS/360 was developed by IBM before Unix existed and AIX is a distribution of Unix from IBM. Windows is more like Unix than OS/360. Sam Tomato (talk) 07:36, 24 January 2017 (UTC)

Unclear text
While doing a thorough copyedit of this article, I marked a few places where the text was unclear to me with HTML comments. Please see the page source. - dcljr 08:10, 17 Sep 2004 (UTC)

 * You write "what is ??" I believe it's simply what a C programmer would call   -- it's a convention for hexadecimal I've seen in a few places. (Given that it appears in the EBCDIC section, perhaps it's an IBM-specific notation?) JTN 20:47, 2004 Oct 4 (UTC)

 * See IBM Knowledge Center - ASCII and EBCDIC character sets. In EBCDIC, hexadecimal 15 is new-line and hexadecimal 25 is line feed. However I find an IBM conversion table that is more confusing. Sam Tomato (talk) 07:56, 24 January 2017 (UTC)

Solutions
Would be nice if this article included or linked to methods for converting the various formats since this is still occasionally problematic. I doubt my long-standing method of running a sed command from vi involving CTRL-V CTRL-M is optimal... --16:13, 17 May 2005 (UTC) — Preceding unsigned comment added by Chinasaur (talk • contribs) 16:13, 17 May 2005 (UTC)

I just added perl program and a couple of other conversion hints including one for emacs. Hope that helps? It's the best I know. Grem 10:43, 13 September 2005 (UTC)

Merge?
This has been a problem for some time, and its only getting worse. The articles Line feed, CRLF, Carriage Return, and Newline all contain pretty much the same information, just phrased differently -- I propose we merge and redirect all other articles to this one, as it is the most complete and has a platform-neutral title. Comments? 63.188.144.35 19:16, 11 Jun 2005 (UTC)

 * I'm not entirely convinced that line feed and carriage return shouldn't retain their own articles, as their distinct semantics don't quite sit right under newline. I agree that all the stuff about line-ending conventions, including the whole of CRLF, should come to newline, though, with prominent pointers from the individual articles. -- JTN 22:48, 2005 Jun 11 (UTC)

 * I agree. It was just bad to begin with these separate articles for very closely related topics. Today, line feed and carriage return simply denotes a newline, and historical backgrounds can be easily put in each corresponding section. -- Taku 22:53, Jun 11, 2005 (UTC)

Well, it seems there's consensus for CRLF at the very least, so I'll go ahead and merge it in. As for line feed and carriage return, I realize they have historical signifigance, but its not exactly a practical usage nowadays. I think the historical implications of the terms can be best described in the Typewriter article; it already explains that the terms have been adopted amongst computer users. 63.188.168.95 17:48, 12 Jun 2005 (UTC)

This article should be merged with End-of-line, which has a posted in it. --Mareklug talk 18:20, 5 September 2006 (UTC)
 * Yes, merge CWC (talk) 06:44, 6 September 2006 (UTC)

 * Yes- end-of-line could remain as a pointer to the Newline article, but i think the content fits best in newline: \js 17:04, 7 November 2006 (UTC)

 * End-of-line has been merged here. Guy Harris (talk) 06:24, 23 August 2017 (UTC)

"Line anchors"
I haven't found any reference to "line anchors" on the web, except in the context of regular expressions, where the term seems to be used for the '^' and maybe the '$' zero-width assertions when in multi-line mode. While these constructs obviously work with newlines, they are not newlines, so I think the statement in the intro that newlines are sometimes called line anchors is wrong. If there is some other use of the term line anchor that I'm not aware of, could somebody please cite a source? --K. Sperling 10:38, July 25, 2005 (UTC)

 * I thought that I heard the term "line anchor" somewhere I don't remember. I will restore the mention of this if I find some reference. -- Taku 23:18, July 25, 2005 (UTC)

Entering Special Characters / Editor Treatment and Conversion
I'm going to remove these two sections, because the content is inaccurate and partially also irrelevant. I wanted to give a more detailed explanation here first, though:

 * ctrl-j / ctrl-m: These aren't codes for LF and CR. The ctrl-? / C^? / \c? notation / keyboard translation / escape sequence is just a way of referring to a character with a certain number. J is the 10th letter in the alphabet (counting from A=0), so ctrl-J is the simply the character with number 10, i.e. 0x0A. Similarly, Ctrl-M is 0x0D. Saying that these are "usually" LF and CR is wrong, unless you assume that computers "usually" use ASCII.
 * Entering them in vi/emacs/etc: I don't think this article is about teaching people how to enter control characters into various shells and editors.
 * The Common Problems section already says that modern text editors generally recognize all flavours of CR / LF newlines; this obviously includes the mentioned vi, emacs and eclipse (even though some people might not consider vi modern ;-). I don't think the article needs to mention how to perform the conversion in emacs specifically, though.
 * The perl one-liner will actually work on UNIX. Whether or not it works on Cygwin depends on the Cygwin configuration: If Cygwin is configured to use DOS/Windows newlines, it won't work, because the script won't see any CRs on input and they will be re-added on output (Perl uses the same text/binary IO modes as C does, and files are in text mode by default).
 * Neither GNU make nor bash ignore a final unterminated line in the versions I have tested (GNU Make 3.80, GNU bash 2.05b.0(1)-release). The only program I can think of off-hand that still has this bug is cron.
 * And last but not least, questions should go on the talk page, never in the article!

--K. Sperling (talk) 23:53, 13 September 2005 (UTC)

--

 * ctrl-j / ctrl-m: These aren't codes for LF and CR. The ctrl-? / C^? / \c? notation / keyboard translation / escape sequence is just a way of referring to a character with a certain number. J is the 10th letter in the alphabet (counting from A=0), so ctrl-J is the simply the character with number 10, i.e. 0x0A. Similarly, Ctrl-M is 0x0D. Saying that these are "usually" LF and CR is wrong, unless you assume that computers "usually" use ASCII.

Most computers DO usually use ASCII.

 * Entering them in vi/emacs/etc: I don't think this article is about teaching people how to enter control characters into various shells and editors.

This is one of the most common questions I get. I would like to be able to point users at Wikipedia to help solve it. Should I start a new article? Can you suggest a title?

 * The Common Problems section already says that modern text editors generally recognize all flavours of CR / LF newlines; this obviously includes the mentioned vi, emacs and eclipse (even though some people might not consider vi modern ;-). I don't think the article needs to mention how to perform the conversion in emacs specifically, though.

Again, conversion is a very common question, and it not addressed elsewhere. Instead of just removing useful information, you might instead move it to a better place? Why is it wrong for the conversion section?

 * The perl one-liner will actually work on UNIX. Whether or not it works on Cygwin depends on the Cygwin configuration: If Cygwin is configured to use DOS/Windows newlines, it won't work, because the script won't see any CRs on input and they will be re-added on output (Perl uses the same text/binary IO modes as C does, and files are in text mode by default).

Good point. I would be happy to see the one liner in Conversion as mentioned that it will work under UNIX. Any reason why not?

 * Neither GNU make nor bash ignore a final unterminated line in the versions I have tested (GNU Make 3.80, GNU bash 2.05b.0(1)-release). The only program I can think of off-hand that still has this bug is cron.

Who said GNU? The fact is that not everyone is using the latest version of all-GNU products. In any case, the caveat is useful even without the particular examples.

 * And last but not least, questions should go on the talk page, never in the article!

I don't really understand this. As a reader, seeing a question in the article points me to relevant information where I am encouraged to edit and contribute. Isn't that the point of Wikipedia? There was some discussion of "publishable" versions, and I understand that questions look unprofessional in such a text. Which is more important?

Grem 11:35, 15 September 2005 (UTC)

 * I'm well aware that many computers use ASCII, but it's also a fact that many don't. Especially seeing that there is a fair bit of confusion even among programmers (e.g. many people don't realize that CR and LF exist in other codes besides ASCII and have different numerical representations there), it's important not to gloss over these details. A statement like "A line feed is usually typed ctrl-j" is simply too imprecise in this context -- not only because it ignores the issue of character sets other than ASCII; in a GUI-based application (e.g. on Windows) pressing crtl-j will often not produce any character at all.

 * Bash is GNU Bash, and 2.05 is not the latest version, they're up to 3.something. GNU make is probably one of the more widely used make implementations, too. You can't just go claiming that "Some unix programs (like make and bash) will silently ignore the last line if there is no newline at its end.", listing bash and make (without naming any versions or specific make implemenations) as examples when the problem doesn't exist in very widely used versions. It really wouldn't have hurt if you'd tried to verify these claims before adding them to the article. (Incidentally, the introduction already says that some programs have problems if the last line isn't NL terminated, without restricting it to Unix.)

 * About editors (and conversion utilities), if you include Emacs and vi, why not also include pico, nano, Scite, KWrite, UltraEdit, ...? This article is about newlines, not about how to use one editor or another. Also see What_Wikipedia_is_not, particularly "wikipedia is not instructive". I realize that viewing text files from other platforms is a somewhat common problem for end-users, so I think it's OK to have a few hints for the most commonly used platforms, and I've added one way to do it for Windows and listed two methods for Unix, but generally this is not what this article (or probably any article of an encyclopedia) is about. I don't see much reason for including a Perl version; there's already the comfortable dos2unix one mentioned, and tr (which is part of the POSIX standard, and available on partically every Unix platform) for where dos2unix isn't available. It could also be done with sed, awk, or even in plain bash; I don't see what merits inclusion of the Perl version. If you get asked about this often, and want to point people somewhere, why not point them to the manual of whatever editor they're using.

 * As for the questions to prompt contributions, I don't have a link handy, but I'm fairly certain it's mentioned on some policy or guide. It's just not done, and the fact that you edited without being prompted by a question also proves that it's not necessary ;-) --K. Sperling (talk) 13:38, 15 September 2005 (UTC)

Using the diff Program with Different Line Endings
When you use programs like diff to compare the text in two file which uses different line endings there are some ambiguites. Unlike most modern text editors the original unix diff program and GNU diff seems to think that the files differ even though the content except for the line endings are the same. This makes porting between for example GNU/Linux and MS Windows more difficult. The http://www.GnuWin32.org/ port of GNU utilities have changed this behaviour so that diff does not care whether CR/LF or just LF is used as the line ending. This seems useful to me and I think that just as the text editors the diff program ought to think of line endings as just line endings and not care about its actual format when comparing two files. — Preceding unsigned comment added by 83.249.205.211 (talk • contribs) 19:01, 24 September 2005 (UTC)

Conversion using Windows Notepad/Edit?
It's true Notepad doesn't understand LF as "new line". But instead of using edit (and advising Windows users to use old text DOS program) I'd recommend Wordpad. It opens files greater than 64 KiB (Notepad can't do this) and easily converts LF to CR LF with just open/save. Wordpad is part of standard Windows distribution and is for sure more Notepad-user-friendly than any DOS tool. I'd change the page myself, but, as can be seen in this text, my English skills won't suffice :)

 * Hm, I don't have wordpad installed on my windows xp... maybe I manually de-selected it during the installation, I don't really remember. Maybe we should just mention both Wordpad and EDIT then. --K. Sperling (talk) 13:20, 1 October 2005 (UTC)

 * From the command line (Windows Vista may also apply to other versions such as XP) WordPad is executed by the command "write" and there is no "wordpad" command. The advice above about using WordPad in Windows to convert line endings is valid and useful but should include mention that to execute WordPad from the command line it the user needs to enter "write" as in C:>write sample.txt otherwise it may appear that WordPad is not installed. --Pdegregorio (talk) 12:40, 7 May 2009 (UTC)

Is the DOA mnemonic Original Research?
I'm troubled by one of my own inclusions on this page. I have used the DOA mnemonic, which I added to the Newline in programming languages section, to help myself remember the hexadecimal equivalent of CR-LF in assembly language using the debug program on Windows. It is short, simple, and (I think) useful to programmers; but in the interest of fairness, my conscience requires I state:

 * I have not seen this mnemonic mentioned in any book or website, and so it could be argued that it is unverifiable/OR (not suitable for Wikipedia); this was particularly a problem with my original phrasing, which seemed to indicate that it was widely-used (I've rephrased it).
 * However, it is so simple that it could be thought of by anyone familiar with the hex code for CR-LF. In other words, it might have been thought of before and I am simply unaware of it.
 * Short pieces of code and such are regularly contributed to technical articles (including this one) without any source, and some are obviously at least semi-original. This a form of "mental code", if you will, to aid memory. We do not hunt down every minutely original thing, do we? (If we did, how could we do anything but copy exact phrasings of others... and wouldn't that violate copyright?)

I'm really up in the air about this one. Any thoughts of anyone else would be appreciated. BlueGuy213 04:52, 30 January 2007 (UTC)

 * Any information which is not mentioned in any primary or secondary source (such as a textbook or research paper) is not appropriate for Wikipedia. That's covered by WP:OR. Also relevant: Wikipedia is not for things made up in school one day — which in the intro paragraph actually mentions "original mnemonics" as something that Wikipedia Is Not for. (I didn't know that that was there until just now, either.) WP:NOT also mentions that Wikipedia is not a "how-to" guide, so if an article contains a mnemonic, it should be because the mnemonic is encyclopedic (e.g., popular), not just "here's how to remember XYZ..."

 * That particular mnemonic is a tad morbid, don't you think? I'm not surprised it's not used in any textbooks!

 * I'm going to remove the "dead on arrival" mnemonic from the article, now that we've established that it's original research, and thus no citation can be provided. (Console yourself with the thought that since it's so simple, anyone who needs it will immediately think of it on their own, without needing help from Wikipedia. :) --Quuxplusone 08:17, 30 January 2007 (UTC)

 * I agree that it is somewhat morbid, but it has been useful to me also, so I was hoping it could be kept. I guess if policy specifically says no original mnemonics, then I've got no legs to stand on. Oh well, I'll move on to other things... but maybe someday I'll write a computer book using it (and then maybe somebody else will add it back)! 75.5.199.76 09:59, 30 January 2007 (UTC)

 * The previous post was mine (forgot to sign in). BlueGuy213 10:01, 30 January 2007 (UTC)

Conversion utilities
The overwriting example given like this:

cat filename | tr -d '\r' > filename

only worked because both cat's own buffering and the in-kernel pipe buffer meant that the beginning of the file could be read and eventually given to tr before the shell would truncate it and setup it as tr's STDOUT. You would lose the rest of your file if it was larger than those buffers (usually no more than a few tens of KB). It doesn't work because the file is truncated before you begin to overwrite it, but it might have worked somewhat if it were just overwritten since the new chunks would only be 1 char larger or smaller per-line and the buffering would have allowed enough slack to prevent unread parts from being overwritten. But that would have been risky still. —Preceding unsigned comment added by 24.200.77.59 (talk • contribs)

 * True enough (depending on the OS and a bunch of other stuff, obviously). I've removed the useless use of cat. (Gee, that's a silly redirect, but it does seem to get used occasionally...) If some reader doesn't realize that infile and outfile must be different files on some operating systems, then that reader probably isn't going to be using tr to port text files between different OSes in the first place. There's no need to clutter the article itself with irrelevant technical minutiae. --Quuxplusone 06:06, 25 April 2007 (UTC)

Terminal conventions.
Does anyone know what conventions were used by Terminals like the VT100? I'm aware the IBM PC compatibles had ROM BIOS that converted the key code from what is now called the "Enter" key in to CR, Ox0D,CNTRL-M, but what did standard serial terminals send?

 * Usually CR, but you could tell the terminal to send LF instead using an escape sequence. CWC 08:04, 5 July 2007 (UTC)

 * They sent ^M, and required both ^M and ^J to go to the start of the next line. VT220's at least had a configuration option to make ^J act like both ^M and ^J, not sure about VT100. —Preceding unsigned comment added by Spitzak (talk • contribs) 16:51, 13 October 2009 (UTC)

Disambiguation
I have created a disambiguation page for line break and changed the link that redirects to newline from line break to line break (computing). I also have a copy of this page saved in case anyone is looking for it, but I'm pretty sure it's just as easy to find now. —Preceding unsigned comment added by Ark2120 (talk • contribs) 16:55, 18 October 2007 (UTC)

some modern Adobe products still exhibit the obsolete Mac OS 9 linefeed behavior
We encountered this issue while trying to svn checkin a Flash actionscript edited alternately on Mac OS X 10.4.10 with "Adobe Flash CS3" and "Adobe Flex beta 3", built on Eclipse. Adobe Flash CS3 saves with CR, while Flex save with LF only (the right thing for a psuedo-UNIX like Mac OS X).

Anyhow, just thought Adobe should be publicly flogged for persisting Mac OS 9 behavior well past its obsolence, and praised for moving in the right direction finally. —Preceding unsigned comment added by 208.72.192.23 (talk) 01:08, 22 November 2007 (UTC)

Office X does the "CR" thing too, if you export an Excel document as text it'll use CR line delimiters. I don't think CR is "obsolete Mac OS 9" behavior; Mac OS X is a platform consisting of multiple glued together systems, and as such it has more of these kinds of problems than most other platforms. Adobe shouldn't be flogged so much as Apple for not laying down a standard and ensuring the Carbon and Cocoa APIs encourage that standard's use. --Squiggleslash (talk) 15:27, 22 November 2007 (UTC)

Programing Helpers
I added a bit about special handling of newlines during program execution to the "Newline in programming languages" section. It feels a bit wordy to me, but is the best I could explain it. Someone more gifted with English may want to clean it up. badmonkey (talk) 03:58, 18 December 2007 (UTC)

I am deleting the part about C++ std::endl. Using it "because '\n' isn't portable" is a very frequent bug in C++ programs, hurting performance by forcing a stream flush for every line written. I see the section correctly mention what std::endl does near the top, but further down it lists it among things "[faciliting] newlines during program execution", which is plainly wrong. JöG (talk) 10:49, 30 March 2008 (UTC)

AT command
Accessing modems using the AT command set instructions are terminated with a carrige return symbol. You can read this in Command and Data modes (modem) and Hayes command set. I have tested this also with minicom and an old POTS modem. Thence this should be mention but I'm not that good in english to edit an article in such a major topic. --84.156.100.251 (talk) 17:50, 20 March 2008 (UTC)

End of Line detection
In the bash and ksh93 shells the following will not work as '\r\n' will be seen as the string 'rn'.

egrep -L '\r\n' myfile.txt # show UNIX style file (LF terminated) egrep -l '\r\n' myfile.txt # show DOS style file (CRLF terminated)

For these shells, one need to use builtin shell expansion $'word'

egrep -L $'\r\n' myfile.txt # show UNIX style file (LF terminated) egrep -l $'\r\n' myfile.txt # show DOS style file (CRLF terminated)

The file command should also detect the type of EOL used: file myfile.txt > myfile.txt: ASCII text, with CRLF line terminators

Other tools permit to visualise the EOL characters like the following commands: od -a myfile.txt cat -e myfile.txt hexdump -c myfile.txt --Ripat (talk) 13:51, 24 June 2008 (UTC)

 * The grep commands in the article (the same as these above) do not work with bash 4.1.5 and grep 2.6.3, which is the second-latest stable version. -Pgan002 (talk) 18:42, 14 April 2011 (UTC)

Inherently smarter
Dear Sirs, I notice there are different ways to write a paragraph: Please mention which format is inherently smarter. Jidanni (talk) 01:50, 2 February 2009 (UTC)
 * 1) No newline (\n) until the very end, maybe hundreds of characters along.
 * 2) Newlines every 80 characters or so. Then a pair of them at the end.

 * Are you looking for ways to store multiple rectangular texts in a file? 2A01:119F:31B:5D00:CDA:B9B8:6D94:5EE (talk) 15:10, 22 September 2020 (UTC)

Microsoft Excel for Mac txt export
I recently noticed that the export plugin of Excel for Mac exports txt files with CR only. Mayb this should be mentioned since it's a bad error source for programmers expecting LF and CR LF is all they need to take care of. CatzHoek (talk) 20:51, 4 April 2010 (UTC)
 * Please inform the Excel version number.Hyungjin Ahn (talk) 05:22, 1 January 2011 (UTC)

Delete section 5.1 (Microsoft product)
Hi, I don't think that the section on one particular Microsoft product is relevant for this article. I am sure there are many more programs that have bugs / incorrect handling when it comes to newlines and this is not the place to document them. I suggest to remove section 5.1 and 5.1.1 Drdee (talk) 18:51, 3 June 2011 (UTC)

Clarification needed for operating system dependence
When one makes a statement such as "Windows uses CR+LF" or "UNIX uses LF", what precisely makes these operating systems dependent on the respective convention? Namely, are we referring to command line shells, native GUI text widgets, keyboard driver, etc? There are several examples of software that can interpret these characters however they wish (or give the option to the user). As such, it is misleading to say that "On this OS, xx is the newline sequence" when the more accurate statement would be "This software in the OS treats xx as the newline sequence". Otherwise please explain why it is that (without a hack of some sort), LF cannot be used as a newline on Windows. Ham Pastrami (talk) 01:42, 26 September 2011 (UTC)
 * Yes, but the text says "...usually represent a newline..." which seems simple and accurate. Of course LF can be used as a newline on Windows, and I can't think of anything in the kernel which "uses CR+LF", but is there any text in the article that is wrong or misleading? Johnuniq (talk) 03:35, 26 September 2011 (UTC)

Well, the operating system dependence exists in libc, one of the most fundamental library of both OS. For example, printf("\n") has different runtime behavior (Windows outputs CR+LF while Unix outputs LF) by default. An application can bypass libc convention on its OS but it may be considered as non-native. — Preceding unsigned comment added by 130.126.60.252 (talk) 06:12, 27 October 2012 (UTC)

 * libc is one of the most fundamental libraries of *nix, because by design and specification the C library is the OS library (see the POSIX specification). On Windows, MSVCRT.dll is the compatibility layer that makes it possible to program against the standard *nix library. When people first started porting C (a 'small language with only 32 keywords', they used the OS library instead of the *nix library, but that made the code totally non portable, which lead to the definition of the 'standard C library'.  The 'standard C library' (which includes the definition of 'text' and 'binary' modes) is not a definition of MS Windows.
 * The behaviour of the file operations in the standard C library is important in the standard C libary, because the string operations assume terminated strings. Other languages which do not use the standard C library for string handling do not have file operations designed for interoperability with the standard C string handling libary.
 * In DOS, there were two fundamental file API's: 'text' a fast, forward only, character API which determined EOF by the presence of an EOF character. Commonly used for line-oriented read and append. And 'binary', a slow, block/record API with forward/reverse and edit to record position. which determined EOF by the file size recorded in the directory. This distinction does not exist in Windows. The Windows API (CreateFile,ReadFile,WriteFile etc) does not includes a 'text' mode. — Preceding unsigned comment added by 203.206.162.148 (talk) 07:34, 20 November 2012 (UTC)

LF+CR or LFCR
The beginning (abstract?) of the article specifies "LF+CR, or LFCR" as options. Where is the authority for that? I doubt it is true. Sam Tomato (talk) 08:25, 24 January 2017 (UTC)

 * I just fixed it. LF followed by CR was only used in a few rare early computers. Unless you work at a computer museum, you will only encounter:
 * LF: (Unix/Linux/Mac OS/BSD)
 * CR+LF: (Windows/DOS/)
 * CR: (Commodore/TRS-80/Apple II/Classic Mac OS)
 * --Guy Macon (talk) 17:53, 16 December 2017 (UTC)

Notepad
Notepad interprets CR LF as newline, but only CR or only LF will show as graphic character. — Preceding unsigned comment added by PiotrGrochowski000 (talk • contribs) 08:53, 17 March 2015 (UTC)
 * Not anymore: https://www.howtogeek.com/fyi/microsoft-finally-fixes-notepad-after-20-years-of-inadequacy/ https://www.zdnet.com/article/windows-notepad-finally-understands-everyone-elses-end-of-line-characters/ Chrisahn (talk) 18:44, 10 June 2018 (UTC)
 * "Microsoft just announced yesterday that the upcoming update to Windows 10 is going to finally, after 20 years or so, fix Notepad" does not equal "not any more". We need to wait until they actually do it. --Guy Macon (talk) 19:10, 10 June 2018 (UTC)
 * Added the cites, as we've waited long enough :-) Lent (talk) 06:52, 4 January 2023 (UTC)
 * And rightfully. A line feed by itself is invalid in the .txt format. It's just that poorly programmed text editors produce tons of invalid text files every year. 160.86.19.55 (talk) 15:38, 23 January 2019 (UTC)

Not true. The .txt format does not define what a newline is.

According to IEEE Std 1003.1-2017 / POSIX.1-2017, the following definitions apply:

 * 3.403 Text File

 * A file that contains characters organized into zero or more lines. The lines do not contain NUL characters and none can exceed {LINE_MAX} bytes in length, including the character. Although POSIX.1-2017 does not distinguish between text files and binary files (see the ISO C standard), many utilities only produce predictable or meaningful output when operating on text files. The standard utilities that have such restrictions always specify "text files" in their STDIN or INPUT FILES sections.

 * 3.206 Line

 * A sequence of zero or more non- characters plus a terminating character.

 * 3.243 Newline Character

 * A character that in the output stream indicates that printing should start at the beginning of the next line. It is the character designated by '\n' in the C language. It is unspecified whether this character is the exact sequence transmitted to an output device by the system to accomplish the movement to the next line.

That "the character designated by '\n' in the C language" language gives us another important clue:

C escape sequences include:

The new-line character \n OS-specific newline byte or byte sequence. That's because in Unix printers and terminals are abstracted in the operating system, and the operating system determines which byte sequences are generated for the device.

Do you want CR? Use

Do you want LF? Use

Do you want CRLF? Use

Do you want LFCR? Use

Do you want the output to automatically be the correct newline sequence for your operating system, whether it be Unix, Linux, Mac OS, BSD, Windows, DOS, Commodore, TRS-80, Apple II, Classic Mac OS or some rare early mainframe? Use

--Guy Macon (talk) 16:48, 23 January 2019 (UTC)

 * Form feed is often called line feed? Where is that?

 * "Line feed" (LF) and "form feed" (FF) are separate ASCII characters - LF moves the paper up by one line (without returning the carriage to the left margin), and FF moves the paper up to the top of the next page.

 * But, yes, there is no single standard format for text files:

 * Multics, and Unix-like systems, use LF/NL (octal 12) at the end of a line;
 * various DEC operating systems, CP/M, DOS, and Windows use CR-LF (octal 15 followed by octal 12) at the end of a line;
 * the classic Mac OS used CR (octal 15) at the end of a line;
 * OS/360 and successors, RSX-11, and VMS use either fixed-length records or variable-length records with a byte count and no end-of-line character, although VMS later added support for text-stream files;

 * and so on, so "A line feed by itself is invalid in the .txt format." is a false statement if "the .txt format" means "text files" or "files with the extension .txt". It may be a true statement it means "DOS/Windows text files", although, in practice, at least some software for Windows probably accepts lines of that format just to make life simpler for people who might have to deal with files from Unix-like systems, just as at least some software for Unix-like systems accepts lines ending with CR/LF, ignoring the CR, just to make life simpler for people who have to deal with files from Windows. Guy Harris (talk) 19:39, 23 January 2019 (UTC)
 * @Guy Macon: No, you're thinking of something else? A correct statement is that \r = CR = 13 decimal in ASCII, \n = LF = 10, \f = FF = 12. CR = carriage return = move cursor to left margin; LF = linefeed = move cursor down one line; FF = formfeed = advance paper to top of next sheet when printing. In DOS-based systems a text file has lines separated by \r\n (CRLF). In Unix-based systems a text file has lines terminated by \n (LF, and software that manipulates such files treats LF in the same way that CRLF is treated in DOS). FF is never called linefeed (although, on the internet, someone probably uses that incorrect statement). The IP's comments above are totally wrong. I think Notepad in Windows 10 now treats \n (LF) as a line terminator. Johnuniq (talk) 00:17, 24 January 2019 (UTC)

 * I made a silly error regarding form feed. I don't know what I was thinking, but what I wrote was dead wrong.

 * Regarding \n, do you disagree or disagree with [ https://en.cppreference.com/w/cpp/language/escape ] which says

 * "The new-line character \n has special meaning when used in text mode I/O: it is converted to the OS-specific newline representation, usually a byte or byte sequence. Some systems mark their lines with length fields instead."

 * Do you disagree or disagree with with Escape sequences in C, which says

 * "Each escape sequence in the above table maps to a single byte, including \n. This is despite the fact that the platform may use more than one byte to denote a newline, such as the DOS/Windows CR-LF sequence, 0x0d 0x0a. The translation from 0x0a to 0x0d 0x0a on DOS and Windows occurs when the byte is written out to a file or to the console, but \n only creates a single byte within the memory of the program itself"

 * Do you disagree or disagree with IEEE Std 1003.1-2017, which says

 * "Text File: A file that contains characters organized into zero or more lines. Line: A sequence of zero or more non- characters plus a terminating character. Newline Character: The character designated by '\n' in the C language. It is unspecified whether this character is the exact sequence transmitted to an output device by the system to accomplish the movement to the next line."

 * Do you know of another standard that defines text files in such a way that the definition of newline disagrees with IEEE Std 1003.1-2017?

 * Do you disagree or disagree that, in the context of a text file in memory being written out to a file on disk, the definition of \n is OS specific? --Guy Macon (talk) 06:21, 24 January 2019 (UTC)
 * I don't know anything about standards for text files but those quotes are correct for what happens in the real world. RSX-11 had a text file format whose name I have forgotten. Each line is prefixed by its length (a binary number), and there are no line terminators or separators. A C program might read characters from a text file using a standard library function. On RSX-11 that program would find \n as a line terminator despite the fact that there would normally be no CR or LF characters in the file on disk. That happens because the standard library translates operating system quirks into a common format. The OP seems to be about Notepad which does not necessarily follow C/Unix procedures, although I think the Windows devs finally made it work with a file using LF terminators to avoid the ridicule that had been rightly dumped on Notepad. Johnuniq (talk) 07:10, 24 January 2019 (UTC)

 * And VMS supported at least that if not more. RMS-11 supported both variable and variable with fixed control; I'm not sure whether whatever its predecessor was called supported both. Guy Harris (talk) 08:37, 24 January 2019 (UTC)

 * "do you disagree or disagree with [ https://en.cppreference.com/w/cpp/language/escape ]"

 * I agree with its description of the way C text-mode I/O works. I disagree with any and all claims that it describes anything whatsoever about the format of text files.

 * "Do you disagree or disagree with with Escape sequences in C, which says"

 * I agree with that, given that it explicitly says "This is despite the fact that the platform may use more than one byte to denote a newline, such as the DOS/Windows CR-LF sequence, 0x0d 0x0a. The translation from 0x0a to 0x0d 0x0a on DOS and Windows occurs when the byte is written out to a file or to the console", i.e. it explicitly says that it makes no claims about the format of text files.

 * "Do you disagree or disagree with IEEE Std 1003.1-2017"

 * I agree that it describes what might be called "POSIX text files", although not all systems conforming to some version of POSIX use that format for all text files (some versions of z/OS are UNIX 95-certified, but if you have a file that was read in from a card deck back in the old days and never removed, it's probably a bunch of 80-byte fixed-length EBCDIC card images, with no EBCDIC newlines in it), and not all systems with text files are POSIX-compliant, so it isn't a general description of all text files.

 * "Do you disagree or disagree that, in the context of a text file in memory being written out to a file on disk, the definition of \n is OS specific?"

 * If you rephrase that as "the definition of whatever a \n turns into when written to a file in a C program", I agree, except that it doesn't necessary "turn into" anything directly - if the OS has a text file format in which a line is represented by, for example, a 2-byte or 4-byte binary octet count, followed by the octets of the line, with no line terminator character, the \n doesn't get mapped to a sequence of characters, it just indicates to the I/O library that the line ends, so you write out the length followed by the character preceding the \n.

 * So, again, the C conventions have nothing to do with any standard text file format; they're based on the Multics-derived UNIX conventions, but that doesn't require the target OS's text files to look anything like UNIX text files.

 * I.e., there's no universal standard for text files, so both "lines in text files must end with just an LF character" and "lines in text files must end with a CR-LF pair", as general statements about text files, are false. Guy Harris (talk) 07:23, 24 January 2019 (UTC)
 * Perfectly said, and that's without even mentioning EBCDIC. Johnuniq (talk) 08:52, 24 January 2019 (UTC)
 * And thus the claim by the IP at the top of this thread that "A line feed by itself is invalid in the .txt format. It's just that poorly programmed text editors produce tons of invalid text files every year" is false as a general statements about text files.
 * "There's no universal standard for text files" is exactly right. As an example, one of the first use of text files (stored on punch cards instead of magnetic disks) was when IBM expanded on Hollerith's original punched card to store the following characters:

________________________________________________________________     / -0123456789ABCDEFGHIJKLMNOPQR/STUVWXYZ. $   ,  12 / O           OOOOOOOOO                        OOOOOO 11|  O                   OOOOOOOOO                     OOOOOO 0|   O                           OOOOOOOOO      ? ?    OOOOOO 1|    O        O        O        O   2|      O        O        O        O       O     ? ?    O   3|       O        O        O        O       O     O     O     O   4|        O        O        O        O       O     O     O     O   5|         O        O        O        O       O     O     O     O   6|          O        O        O        O       O     O     O     O   7|           O        O        O        O       O     O     O     O   8|            O        O        O        O OOOOOOOOOOOOOOOOOOOOOOOO 9|            O        O        O        O    |__________________________________________________________________
 * Source:

 * While this was unambiguously a "text file", the end of a line wasn't signified by a character. It was signified by running out of space on the 12x80 hole card. The space character was signified by no punches, so if you only put 10 characters on a card the remaining 70 characters were considered to be spaces. --Guy Macon (talk) 18:14, 24 January 2019 (UTC)

Let me clarify. '''The txt format was made by Microsoft. Microsoft made Notepad to open and save valid txt files. It doesn't treat U+0000000A by itself as a newline, because a newline is only U+0000000D U+0000000A in the .txt format.''' Your examples of plaintext using different encoding are invalid because they aren't the .txt format. 124.59.78.196 (talk) 19:38, 26 January 2019 (UTC)

 * And you know what is and isn't "valid" ... how? And you got your definition for "the .txt format" ... where? The rest of the world seems to think that there are all kinds of different text formats on different systems, and that there exists no One True Standard for text files. And who told you that "the txt format was made by Microsoft?" That's complete bullshit. CP/M was making extensive use of text files with the .txt extension years before Microsoft did, and I am pretty sure (but have not verified) that various mainframes did that even earlier. --Guy Macon (talk) 20:31, 26 January 2019 (UTC)

 * Microsoft was known for its awesomeness (until Windows 8 and Windows 10 appeared). So, it's only natural, that they would develop all the things modern people take for granted, like the .txt, .bmp and .wav formats. 46.41.73.166 (talk) 06:51, 27 January 2019 (UTC)

 * The above trolling was clearly compiled with inferior tools. My guess is that you used Visual Troll++, or possibly TurboTroll 2000.

 * These first generation tools are quite limited, and there is a severe garbage-collection-related performance hit when you try optimizing the output of VT++ for flaming or insults.

 * I suggest that you try the latest version of GTC; the Gnu Troller Collection. It is *the* standard when it comes to creating Trolls. It is also Free and Open Source, reentrant, and is fully compliant with the Triple Troll, Troll-On-Troll and TrollChow protocols. --Guy Macon (talk) 17:38, 27 January 2019 (UTC)

Intelligibility
Without knowing already what this article is about, I would not understand it at all. Currently the article begins with:

"»In computing, a newline, also known as a line ending, end of line (EOL), or line break, is a special character or sequence of characters signifying the end of a line of text and the start of a new line. The actual codes representing a newline vary across operating systems, which can be a problem when exchanging text files between systems with different newline representations.«"

 * 1) A link to character encoding should be there as well, to embed this whole thing somewhere (<- BTW, that article is also crap, prefer de:Zeichenkodierung.)

 * 1) character (computing) should be replaced with control character
 * 2) For practical purposes one could bother to mention the most frequent issue: to encode a line-break/newline in a text file UNIX uses , Microsoft uses.
 * 3) printing User:ScotXW t@lk 10:51, 16 December 2017 (UTC)
 * 4) Some context for the title "wall of text" would be nice. This phrase is used as a title and never explained. I assume this refers to the what you get in an editor if newlines are omitted.  — Preceding unsigned comment added by Iohazard (talk • contribs) 14:22, 13 March 2018 UTC (UTC)

I moved around a lot of stuff and got rid of the "Wall of text" section (whose title was probably not on topic, but mild meta-level sarcasm). I hope the whole thing makes more sense now. Chrisahn (talk) 18:41, 10 June 2018 (UTC)

In popular culture?
End of line is significantly referenced in Tron and less so in Battlestar Galactica. Probably elsewhere. Is it worth a brief section? Titaniumlegs (talk) 21:42, 22 January 2020 (UTC)

Visual representations
There should be a section on visual representations of line breaks, such as these:

/ ⪪ ≡ ↵ ⏎ ␤ ␍ ␊

I know some of these are briefly mentioned, but there should be a section with examples of how these are used. — Preceding unsigned comment added by 77.61.180.106 (talk) 10:25, 2 June 2020 (UTC)

Escape codes
My contribution of the RS escape code (revision 962480569) was undone for "contradicting" this document: https://www.qnx.com/developers/docs/6.3.0SP3/dinkum_en/cpp/charset.html#Escape%20Sequences

I do not see how this contradicts that document. While C does not have a mnemonic escape sequence for the record separator character, a numeric sequence can be used (see the "Numeric Escape Sequences" section of the aforementioned document). The RS character is 30 in decimal (as documented within the article) which is 36 in octal, hence the \036 escape code. 68.117.55.155 (talk) 00:45, 15 June 2020 (UTC)

 * The actual language was "This appears to contradict [ https://www.qnx.com/developers/docs/6.3.0SP3/dinkum_en/cpp/charset.html#Escape%20Sequences ]. Please discuss on talk page." I have restored your version. --Guy Macon (talk) 01:03, 15 June 2020 (UTC)

IETF quote
Hello User:Guy Harris,

I can't say I understand your reasoning for changing back the capitalisation. MOS:CONFORM states:

What is the importance of leaving those words capitalised? You say "the capitalisation gives the words their magic powers" (not a direct quote). I'm not sure what that means, or why it's important in this article. Please can you elaborate? Regards, DesertPipeline (talk) 08:43, 3 March 2021 (UTC)
 * RFC documents form the standards for a lot of networking and related protocols (the text in question concerns newlines in emails). If an RFC says "must" it is a sort-of opinion, but if it says "MUST" it means that the associated text is part of the standard and must be followed by compliant systems. The edit summary mentions RFC 2119 which documents this. The caps are part of computer jargon. Johnuniq (talk) 09:16, 3 March 2021 (UTC)
 * Very well then. Thank you for the explanation, User:Johnuniq. DesertPipeline (talk) 09:25, 3 March 2021 (UTC)

"Line feed" listed at Redirects for discussion
A discussion is taking place to address the redirect Line feed. The discussion will occur at Redirects for discussion/Log/2021 July 28 until a consensus is reached, and readers of this page are welcome to contribute to the discussion. Shmuel (Seymour J.) Metz Username:Chatul (talk) 15:30, 28 July 2021 (UTC)

"Some text editors"
The last sentence of the lead paragraph of the article Some text editors set this special character when pressing the Enter key. felt very misleading to me, so I changed it. My gripe was that the wording of "some text editors" implies that this behavior is only relatively common, rather than virtually universal. Now, I know that there are, of course, situations where pressing enter doesn't produce a newline (of any type, be it LF or CR or CR+LF or whatever else), like in a single-line form element on a webpage it'll submit the form, and in an instant messenger it'll send a message, but still I maintain this sentence is misleading, implying that producing newlines isn't the key's primary purpose. In typical text-editing situations, whether in a text editor or a multi-line form element, Enter is the key that produces newlines, and it's a special case where it doesn't. I changed it to The newline is the control character (or sequence of characters) produced in most situations when the Enter key is pressed.

— oatco (talk) 00:14, 29 January 2022 (UTC)
 * The stuff about the Enter key should be removed as misleading and unhelpful. It's a very simplistic interpretation of what text editors typically do. Also, per WP:LEAD, the introduction should be a summary of what is in the article and I don't see an explanation regarding Enter (or a reference). There is no mention of "newline" at Enter key (it does mention producing a "new line" which is more accurate). Johnuniq (talk) 01:02, 29 January 2022 (UTC)
 * Good points. I removed the sentence entirely. oatco (talk) 18:14, 29 January 2022 (UTC)
 * I went ahead and also removed the second paragraph, which was just the sentence When displaying (or printing) a text file, this control character or sequence of characters causes the text editor to show the characters following it in a new line., because it was just a rewording of the first sentence. Like the old version of the now-gone Enter key sentence, it was also specific to text editors. oatco (talk) 18:25, 29 January 2022 (UTC)

Teletypes requiring CR+CR+LF
Some older teletypewriters did require CR+CR+LF, i.e. a doubling of the CR code, to give the mechanics enough time to finish their movements. Though it might be that these are (or were) all pre-ASCII, 5-bit Baudot code machines.

I saw this requirement in action on machines used by the German military in 1993/94, though the machines themselves were far older. Some of the slightly newer machines had a special key to produce CR+CR+LF, if I remember correctly that key had three horizontal lines on it, just like the modern "hamburger" symbol used to bring up a menu on web pages and other current UIs. Should this be mentioned? -- 2003:C0:972B:6C00:1A07:7E20:B066:1ECB (talk) 22:30, 22 May 2023 (UTC)

 * The need for padding characters is pretty well documented, I thought there was something about it here already. Do you know if the extra characters had to be CR or would NUL work? Spitzak (talk) 23:56, 22 May 2023 (UTC)

 * I don't remember CR+CR+LF being used -- but NUL certainly was (on Teletypes, but also after some control sequences on display terminals). See the new article output padding. --Macrakis (talk) 17:44, 15 January 2024 (UTC)

title: Talk:Newline