( )
File:Sigurros().jpg
Studio album by Sigur Rós
Released October 28, 2002 (2002-10-28)
Recorded Sundlaugin
Genre Post-rock
Ambient
Art rock
Length 72:05
Label Fatcat/Bad Taste
Producer Sigur Rós, Ken Thomas
Sigur Rós chronology
Ágætis byrjun
(1999)
( )
(2002)
Takk...
(2005)

( ) is the third full-length album from Icelandic band Sigur Rós, first released in October 2002. It comprises eight untitled tracks, divided into two parts: the first four tracks are lighter and more optimistic, while the latter four are bleaker and more melancholic. The two halves are divided by a 36-second silence, and the album opens and closes with a click of distortion. Lead singer Jón Þór Birgisson ("Jónsi") sang the album's lyrics entirely in "Hopelandic", a made-up language consisting of gibberish words. ( ) reached #51 on the Billboard 200 and was positively received by critics, although some reviewers found the album weaker than the band's previous album Ágætis byrjun.

Contents

Production[link]

The album's title consists of two opposing parentheses, representing either the album's two halves, or the idea that the album has no title, leaving the listener free to determine it.[1] Members of the band have referred to ( ) as Svigaplatan, which translates to "The Bracket Album".[2] In the credits of the film Heima, it is referred to as The Untitled Album.[3] The outside packaging of ( ) consists of a plastic protective sleeve with two parentheses cut out, revealing the image printed on the CD case underneath. There are four versions of this cover art, which consist of modified photographs of nature around the band's Mosfellsbær studio, sold in four parts of the world: Europe, the United States, Australia, and Japan. In Iceland, all four cover designs are sold. The back of the packaging shows an image of a sleepwalking boy, adapted from a photograph by John Yang.[4] In 2011, Yang's daughter, Naomi Yang, of the band Galaxie 500, said that the band used the image without permission or payment to her father.[5] There are no liner notes or production credits included, although packaged with the album is a booklet of twelve blank pages, on which listeners are invited to write or draw their own interpretations of the album's music.[1] A limited edition version of ( ) released in Spain includes a 94-page book of contemporary art.[6]

( ) was co-produced and engineered by Ken Thomas, who also worked with the band on their previous album, Ágætis byrjun. This is the first album Sigur Rós recorded at their studio based in Álafoss, Mosfellsbær, a small rural town outside Reykjavík, Iceland. The band refers to the studio as "Sundlaugin", or "The Pool". ( ) includes the work of the female string quartet Amiina. ( ) was given more production and recording time than Ágætis byrjun, although lead singer Jónsi considers the new album "less polished" than its predecessor. He characterized the record as being "much more bare and alive and there are far fewer little slick things and much less sweet stuff." The strings of Ágætis were recorded in just two days, while two weeks were given for their recording on ( ). In addition, the former was performed by the Icelandic Symphony Orchestra, while the latter was done by Amiina. Because of this, the string parts required less preparation prior to recording. The band "just let them 'jam' in the studio until everybody was happy", according to Jónsi.[1]

Music and lyrics[link]

( ) consists of eight tracks divided in half by thirty-six seconds of silence which, in concept, replicates the separation of two sides of a gramophone record.[1][7] The first half of the album is "light and optimistic" musically, with a heavier emphasis on the use of keyboards than guitar, and the sampling of Jónsi's voice. The second half is more melancholic, playing with the emotions of the listener, as described by Jónsi. None of the tracks on ( ) have titles; band guitarist and keyboardist Kjartan Sveinsson said of this choice, "we didn't want to put titles on the record just because there are supposed to be titles on the record." The songs are listed as "Untitled #1", "Untitled #2", etc., although each track has an unofficial name used by the band.[1]

Jónsi sang the lyrics of ( ) entirely in "Vonlenska" ("Hopelandic"), a made-up "language" which consists of meaningless words and syllables. Jónsi uses Hopelandic in place of songs which do not yet have lyrics, although tracks on Sigur Rós albums Von and Takk... are only sung in the language. Its names in English and Icelandic are derived from "Von" ("Hope" in English), the ninth track on the album Von, which is the first instance in which Hopelandic is used in the band's music.[8] The Hopelandic of ( ) consists of one eleven-syllable phrase, "You xylo. You xylo no fi lo. You so.", various permutations of which are sung over the course of the album.[7] ( ) is made up of material that Sigur Rós had been playing live for over two years.[1] For this reason, the band did not want to give the songs actual lyrics. Drummer Orri Páll Dýrason said of this, "[the songs] were fully formed and it would have been strange to suddenly insert lyrics into these finished products."[9]

Release[link]

Pitchfork Media placed ( ) 29th on its list of the fifty best albums of 2002,[10] and 135th on the a list of the top 200 albums of the 2000s.[11] The album also peaked at #51 on the Billboard 200.[12] A music video for "Untitled #1" directed by Floria Sigismondi was released in April 2003. The video depicts a dystopian future in which schoolchildren wearing gas masks are playing amidst black snow and a red sky.[13] In November 2003, Sigismondi's video was given the award for "Best Video" at the MTV Europe Music Awards in Edinburgh, UK.[14]

Critical reception[link]

Professional ratings
Aggregate scores
Source Rating
Metacritic (82/100) [15]
Review scores
Source Rating
Allmusic 4/5 stars[16]
Entertainment Weekly (B+)[17]
Robert Christgau (C)[18]
Pitchfork Media (7.6/10)[7]
Drowned In Sound (positive)[19]
Rolling Stone 4/5 stars[20]
Q Magazine 4/5 stars[21]
Alternative Press 5/5 stars[22]
Stylus Magazine Lindsay – (A−)[23]
Stylus Magazine Mueller – (B−)[24]
Blender 4/5 stars[25]
Uncut 4/5 stars[26]
PopMatters 7/10 stars[27]
Spin 8/10 stars[28]
Dusted Magazine 8/10 stars[29]

( ) holds a Metacritic score of 82/100 based on twenty reviews,[30] making it one of the thirty highest-scored albums of 2002 according to Metacritic.[31] Daniel Becker of Dusted Magazine wrote that the album is "gorgeous music...the songs are vast, unhurried, and vivid, and that only makes them more powerful." He considers ( ) a "logical extension of Ágætis Byrjun, relying on the same interplay of instruments to create a similarly picturesque and eerily calm atmosphere."[29] Chris Ott of Pitchfork Media wrote that "Sigur Rós' music has all the depth, resonance and humanity of a Brueghel landscape, and is best appreciated at loud volumes in open spaces, as a soundtrack for scenery, real or imagined."[7] Sean Adams of Drowned In Sound said that "( ) is as pioneering, unnerving, inspiring, confusing, as lyrically anarchic as every thing that has moved the world, ever" and "why I love music, why this website has this name and why art exists. ( ) [is] yours to discover."[19] Gavin Mueller of Stylus Magazine found that Jónsi's voice "never [has] sounded more exposed, giving [the band] a strength that Ágætis Byrjun often obscured. The final track’s ultimate climax is nothing short of harrowing, as a crashing storm of frantic drum fills overwhelms Birgisson’s urgent guitar strumming and plaintive wail."[24]

Andy Kellman of Allmusic felt that, with ( ), Sigur Rós made "only adjustments -- no significant developments -- in the group's sound" and that "The fact that the emotional extremes are few and far between makes the album difficult to wade through".[16] Ott wrote that ( ) "doesn't shine with the same nascent glimmer as its predecessor. If the band weren't so headstrong, it wouldn't even be a consideration, but from the beginning they've claimed they would change music forever, and that this record in particular would be even better than [Ágætis byrjun]". In addition, he found the album's main Hopelandic phrase repetitive, and that ( ) lacked the innovation of its predecessor.[7] Gavin Edwards of Rolling Stone called ( ) "impressive" but "remarkably similar" in sound; "it's just packaged more pretentiously."[20] Ott said of the blank booklet included with ( ), "I fail to see how this tactic enriches the band's cinematic balladry", adding, "evidence that they just thought it would be cool to package the record this way is abundant".[7] Mueller called the title of ( ) "forehead-slappingly pretentious", and considered the album's nameless tracks "a jab at Yorke-worshippers who couldn’t pronounce the Icelandic titles of Sigur Ros’s previous work anyway."[24] In his review for PopMatters, music critic Matt Cibula wrote, "I don't think there are any real meanings to these songs, other than the ones we bring to them, each on our own", adding:

My only clue -- and here I'm cheating massively -- is that I saw them in concert a month ago, and these songs were invariably accompanied by hazy images of children, of childhood . . . but even if this stuff is about the end of childhood or innocence or any of those trotted-out tropes, I wouldn't know, and it probably tells you more about me than the opening section of this record.[27]

Media usage[link]

A snippet from "Untitled #8" can be heard during the trailer for the Nicole Kidman film The Invasion.[32] "Untitled #7" is featured in the trailer for the 2008 video game Dead Space.[33] "Untitled #4", as well as "Svefn-g-englar" and the title track from Ágætis byrjun and a video backdrop used during a Sigur Rós concert in Los Angeles, are featured in the film Vanilla Sky. This was the first case of the band licensing their music for a movie; Jónsi allowed for it in part "because he thought the idea of Tom Cruise acting over their music was 'funny'".[34] "Untitled #4" was played in the American TV series Queer as Folk.[35] "Untitled #3", listed as its alternate title "Samskeyti", was used in the credits for the Gregg Araki-directed film Mysterious Skin (based on the novel by Scott Heim),[36] in an episode from the second season of the British serial drama Skins[37] and in the 2009 film The Boys Are Back (directed by Scott Hicks and starring Clive Owen) during the final shots. Various of tracks off () was used in the American crime drama CSI: Miami.[38]. The song Dauðalagið was also used in the final episode of season 3 of The Vampire Diaries on the May 10, 2012. Vaka was also heavily used in the soundtrack to the 2010 Norwegian film King of Devil's Island.

Track listing[link]

All tracks are officially untitled, although each has an alternate name by which the band refers to it.[1]

All songs written and composed by Sigur Rós. 

No. Title Meaning of alternate title Length
1. "untitled #1" (a.k.a. "Vaka") "Vaka" is the name of Orri's daughter 6:38
2. "untitled #2" (a.k.a. "Fyrsta") "Fyrsta" means "The First" or the "First Song" 7:33
3. "untitled #3" (a.k.a. "Samskeyti") "Samskeyti" means "Attachment" 6:33
4. "untitled #4" (a.k.a. "Njósnavélin") "Njósnavélin" means "The Spy Machine" but is known as "The Nothing Song" 6:57
5. "untitled #5" (a.k.a. "Álafoss") Álafoss is the location of the band's studio 9:57
6. "untitled #6" (a.k.a. "E-Bow") Georg Hólm uses an E-bow on his bass in this song 8:48
7. "untitled #7" (a.k.a. "Dauðalagið") "Dauðalagið" means "The Death Song" 12:52
8. "untitled #8" (a.k.a. "Popplagið") "Popplagið" means "The Pop Song" 11:43

Personnel[link]

Sigur Rós:

Amiina:

  • María Huld Markan – violin
  • Edda Rún Ólafsdóttir – violin
  • Ólöf Júlía Kjartansdóttir – viola
  • Sólrún Sumarliðadóttir – cello

Production:

  • Sigur Rós – production
  • Ken Thomas – production, engineering, mixing
  • Marco Migliari – engineering
  • Mandy Parnell – mastering

Charts[link]

Chart (2002) Peak
position
Iceland: Tónlist.is[39] 1
Australia: ARIA Charts[40] 49
Denmark Tracklisten[41] 24
Finland YLE[42] 24
Belgium: Ultratop[43] 33
Ireland: Irish Albums Chart[44] 17
Norway: VG-lista[45] 6
United Kingdom: UK Albums Chart[46] 49
United States: Billboard 200[12] 51

References[link]

  1. ^ a b c d e f g "sigur rós - discography » ( )". Eighteen Seconds Before Sunrise. http://www.sigur-ros.co.uk/band/disco/parenth.php. Retrieved 26 November 2009. 
  2. ^ "Kjartan interview". Archived from the original on 18 October 2007. http://web.archive.org/web/20071018050515/http://milanrecords.com/screamingmasterpiece/playmovie2.php. Retrieved 26 November 2006. 
  3. ^ Dean DeBlois (director) (2007). Heima (Motion picture). 
  4. ^ sigur-ros.co.uk (3 September 2005). "sleepwalker". flickr. http://www.flickr.com/photos/sigurros/39766311/in/datetaken/. Retrieved 29 November 2009. 
  5. ^ Eyeteeth.blogspot.com (20 July 2011). "In the age of derivatives, reasserting an original: John Yang's "Blindman's Bluff"". http://eyeteeth.blogspot.com/2011/07/in-age-of-derivatives-reasserting.html. 
  6. ^ "Sigur Rós ( ) CD Book Spain edition 2003". Popplagið. http://www.popplagid.com/graphics/CDbook1.htm. Retrieved 26 November 2009. 
  7. ^ a b c d e f Ott, Chris (3 December 2002). "Album Reviews: Sigur Rós: ( )". Pitchfork Media. http://pitchfork.com/reviews/albums/7152-sigur-ros/. Retrieved 26 November 2009. 
  8. ^ "sigur rós - frequently asked questions". Eighteen Seconds Before Sunrise. http://sigur-ros.co.uk/band/faq.php. Retrieved 26 November 2009. 
  9. ^ "sigur rós - discography » takk...". Eighteen Seconds Before Sunrise. http://www.sigur-ros.co.uk/band/disco/takk-recording.php. Retrieved 29 November 2009. "orri: "we felt like writing lyrics [for takk]. the reason there were no lyrics on the last album was that we had written these songs years back with jónsi singing gibberish vocals to them the entire time. they were fully formed and it would have been strange to suddenly insert lyrics into these finished products." 
  10. ^ Pitchfork Staff (1 January 2003). "Staff Lists: Top 50 Albums of 2002". Pitchfork Media. http://pitchfork.com/features/staff-lists/5888-top-50-albums-of-2002/3/. Retrieved 28 November 2009. 
  11. ^ Pitchfork (29 September 2009). "The Top 200 Albums of the 2000s". Pitchfork Media. http://pitchfork.com/features/staff-lists/7707-the-top-200-albums-of-the-2000s-150-101/2/. Retrieved 29 September 2009. 
  12. ^ a b "((( ( ) > Charts & Awards > Billboard Albums )))". Allmusic. http://www.allmusic.com/album/r608796. Retrieved 26 November 2009. 
  13. ^ "FatCat Records : Media". Fat Cat Records. http://fat-cat.co.uk/fatcat/mediaItem.php?id=6. Retrieved 26 November 2009. 
  14. ^ Akwagyiram, Alexis (7 November 2003). "World's pop stars descend on Edinburgh for awards". The Guardian. http://www.guardian.co.uk/uk/2003/nov/07/artsnews.scotland. Retrieved 26 November 2009. 
  15. ^ http://www.metacritic.com/music/()
  16. ^ a b Kellman, Andy. "((( ( ) > Overview )))". Allmusic. http://www.allmusic.com/album/r608796. Retrieved 26 November 2009. 
  17. ^ The Icelandic quartet again create an ethereal stir with sparse, atmospheric melodies and a falsetto wail, often recalling the sonic swirl of Stateside slow-core acts like Low. [1 Nov 2002, p.70]
  18. ^ Christgau, Robert. "Robert Christgau: CG: Sigur Ros". Robert Christgau. http://robertchristgau.com/get_artist.php?name=Sigur+Ros. Retrieved 29 November 2009. 
  19. ^ a b Adams, Sean (25 October 2002). "Sigur Rós - ( ) / Releases / Releases". Drowned In Sound. http://drownedinsound.com/releases/3121/reviews/5206-sigur-r%C3%B3s?search. Retrieved 26 November 2009. 
  20. ^ a b Edwards, Gavin (22 October 2002). "Sigur Ros: () : Music Reviews". Rolling Stone. Archived from the original on 3 May 2009. http://web.archive.org/web/20090503115908/http://www.rollingstone.com/artists/sigurros/albums/album/258292/review/6068171/. Retrieved 26 November 2009. 
  21. ^ A masterpiece of bombed orchestral elegance, at once expansive and intense. [Dec 2002, p.112]
  22. ^ Some of the most evocative music of this century. [Dec 2002, p.97]
  23. ^ Lindsay, Cam (1 September 2003). "Sigur Ros - () - Review - Stylus Magazine". Stylus Magazine. http://www.stylusmagazine.com/reviews/sigur-ros/940.htm. Retrieved 26 November 2009. 
  24. ^ a b c Mueller, Gavin (1 September 2003). "Sigur Ros - () - Review - Stylus Magazine". Stylus Magazine. http://www.stylusmagazine.com/reviews/sigur-ros/939.htm. Retrieved 26 November 2009. 
  25. ^ Charming and enrapturing, adrift in its own unique, invented world. [#11, p.142]
  26. ^ The music here is intimate yet remote. [Dec 2002, p.140]
  27. ^ a b Cibula, Matt (27 December 2002). "Sigur Ros: ( )". PopMatters. http://popmatters.com/music/reviews/s/sigorros-2.shtml. Retrieved 26 November 2009. 
  28. ^ On (), the band steer their ghost ship into darker waters, erecting a vast, austere cathedral of sound, then sticking around to score a funeral mass inside. [Dec 2002, p.140]
  29. ^ a b Becker, Daniel (8 December 2002). "Dusted Reviews: Sigur Rós - ( )". Dusted Magazine. http://www.dustedmagazine.com/reviews/506. Retrieved 26 November 2009. 
  30. ^ "() reviews". Metacritic. http://www.metacritic.com/music/artists/sigurros/parentheses?q=sigur. Retrieved 26 November 2009. 
  31. ^ "Best Albums of 2002". Metacritic. http://www.metacritic.com/music/bests/2002.shtml. Retrieved 28 November 2009. 
  32. ^ "Invasion, The reviews at Metacritic.com". Metacritic. http://www.metacritic.com/video/titles/invasion. Retrieved 29 November 2009. 
  33. ^ "Dead Space - Launch (Game Trailer HD)". YouTube. 14 October 2008. http://www.youtube.com/watch?v=LAiHfqnbGYo. Retrieved 29 November 2009. 
  34. ^ "sigur rós - press releases". Eighteen Seconds Before Sunrise. December 2001. http://www.sigur-ros.co.uk/media/press/vanilla.php. Retrieved 29 November 2009. 
  35. ^ "Soundtracks". Queerasfolk.ca. http://queerasfolk.ca/sndtrck.html#ep300. Retrieved 29 November 2009. 
  36. ^ "Sigur Rós". IMDB. http://www.imdb.com/name/nm1460176/. Retrieved 29 November 2009. 
  37. ^ "Skins - Music guide: series 2, episode 3". E4. http://www.e4.com/skins/music/series2-episode3.html. Retrieved 29 November 2009. 
  38. ^ http://www.tunefind.com/artist/sigur-ros
  39. ^ "Öll Íslensk tónlist á einum stað" (in Icelandic). Tónlist.is. http://www.tonlist.is/Music/Chartlist.aspx?ID=0&typeID=1&p=0. Retrieved 29 November 2009. 
  40. ^ "Discography Sigur Rós". australian-charts.com. http://australian-charts.com/showinterpret.asp?interpret=Sigur+R%F3s. Retrieved 29 November 2009. 
  41. ^ "Discography Sigur Rós". danishcharts.com. http://danishcharts.com/showinterpret.asp?interpret=Sigur+R%F3s. Retrieved 29 November 2009. 
  42. ^ "Discography Sigur Rós". finnishcharts.com. http://finnishcharts.com/showinterpret.asp?interpret=Sigur+R%F3s. Retrieved 29 November 2009. 
  43. ^ "Discografie Sigur Rós" (in Flemish). Ultratop. http://www.ultratop.be/nl/showinterpret.asp?interpret=Sigur+R%F3s. Retrieved 29 November 2009. 
  44. ^ "Discography Sigur Rós". irish-charts.com. http://irish-charts.com/showinterpret.asp?interpret=Sigur+R%F3s. Retrieved 29 November 2009. 
  45. ^ "Discography Sigur Rós". norwegiancharts.com. http://norwegiancharts.com/showinterpret.asp?interpret=Sigur+R%F3s. Retrieved 29 November 2009. 
  46. ^ "Chart Stats Sigur Rós". ChartStats.com. http://www.chartstats.com/artistinfo.php?id=748. Retrieved 29 November 2009. 

External links[link]

http://wn.com/(_)




This page contains text from Wikipedia, the Free Encyclopedia - http://en.wikipedia.org/wiki/(_)

This article is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License, which means that you can copy and modify it as long as the entire work (including additions) remains under this license.


Text file created with gedit and viewed with a hex editor
Besides the text objects there are only EOL markers
with the hexadecimal value 0A.

In computing, a newline,[1] also known as a line break or end-of-line (EOL) marker, is a special character or sequence of characters signifying the end of a line of text. The name comes from the fact that the next character after the newline will appear on a new line—that is, on the next line below the text immediately preceding the newline. 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.

There is also some confusion whether newlines terminate or separate lines. If a newline is considered a separator, there will be no newline after the last line of a file. The general convention on most systems is to add a newline even after the last line, i.e. to treat newline as a line terminator. Some programs have problems processing the last line of a file if it is not newline terminated. Conversely, programs that expect newline to be used as a separator will interpret a final newline as starting a new (empty) line.

In text intended primarily to be read by humans using software which implements the word wrap feature, a newline character typically only needs to be stored if a line break is required independent of whether the next word would fit on the same line, such as between paragraphs and in vertical lists. See hard return and soft return.

Contents

Representations[link]

Software applications and operating systems usually represent a newline with one or two control characters:

  • Systems based on ASCII or a compatible character set use either LF (Line feed, '\n', 0x0A, 10 in decimal) or CR (Carriage return, '\r', 0x0D, 13 in decimal) individually, or CR followed by LF (CR+LF, '\r\n', 0x0D0A). These characters are based on printer commands: The line feed indicated that one line of paper should feed out of the printer thus instructed the printer to advance the paper one line, and a carriage return indicated that the printer carriage should return to the beginning of the current line. Some rare systems, such as QNX before version 4, used the ASCII RS (record separator, 0x1E, 30 in decimal) character as the newline character.
  • EBCDIC systems—mainly IBM mainframe systems, including z/OS (OS/390) and i5/OS (OS/400)—use NEL (Next Line, 0x15) as the newline character. Note that EBCDIC also has control characters called CR and LF, but the numerical value of LF (0x25) differs from the one used by ASCII (0x0A). Additionally, there are some EBCDIC variants that also use NEL but assign a different numeric code to the character.
  • Operating systems for the CDC 6000 series defined a newline as two or more zero-valued six-bit characters at the end of a 60-bit word. Some configurations also defined a zero-valued character as a colon character, with the result that multiple colons could be interpreted as a newline depending on position.
  • ZX80 and ZX81, home computers from Sinclair Research Ltd used a specific non-ASCII character set with code NEWLINE (0x76, 118 decimal) as the newline character.
  • OpenVMS uses a record-based file system, which stores text files as one record per line. In most file formats, no line terminators are actually stored, but the Record Management Services facility can transparently add a terminator to each line when it is retrieved by an application. The records themselves could contain the same line terminator characters, which could either be considered a feature or a nuisance depending on the application.
  • Fixed line length was used by some early mainframe operating systems. In such a system, an implicit end-of-line was assumed every 80 characters, for example. No newline character was stored. If a file was imported from the outside world, lines shorter than the line length had to be padded with spaces, while lines longer than the line length had to be truncated. This mimicked the use of punched cards, on which each line was stored on a separate card, usually with 80 columns on each card. Many of these systems added an carriage control character to the start of the next record, this could indicate if the next record was a continuation of the line started by the previous record, or a new line, or should overprint the previous line (similar to a CR). Often this was a normal printing character such as '#' that thus could not be used as the first character in a line. Some early line printers interpreted these characters directly in the records sent to them.

Most textual Internet protocols (including HTTP, SMTP, FTP, IRC and many others) mandate the use of ASCII CR+LF (0x0D 0x0A) on the protocol level, but recommend that tolerant applications recognize lone LF as well. In practice, there are many applications that erroneously use the C newline character '\n' instead (see section Newline in programming languages below). This leads to problems when trying to communicate with systems adhering to a stricter interpretation of the standards; one such system is the qmail MTA that actively refuses to accept messages from systems that send bare LF instead of the required CR+LF.[2]

FTP has a feature to transform newlines between CR+LF and LF only when transferring text files. This must not be used on binary files. Usually binary files and text files are recognised by checking their filename extension.

Unicode[link]

The Unicode standard defines a large number of characters that conforming applications should recognize as line terminators:[3]

 LF:    Line Feed, U+000A
 VT:    Vertical Tab, U+000B
 FF:    Form Feed, U+000C
 CR:    Carriage Return, U+000D
 CR+LF: CR (U+000D) followed by LF (U+000A)
 NEL:   Next Line, U+0085
 LS:    Line Separator, U+2028
 PS:    Paragraph Separator, U+2029

This may seem overly complicated compared to an approach such as converting all line terminators to a single character, for example LF. However, Unicode was designed to preserve all information when converting a text file from any existing encoding to Unicode and back. Therefore, Unicode should contain characters included in existing encodings. NEL is included in ISO-8859-1[citation needed] and EBCDIC (0x15). The approach taken in the Unicode standard allows round-trip transformation to be information-preserving while still enabling applications to recognize all possible types of line terminators.

Recognizing and using the newline codes greater than 0x7F is not often done. They are multiple bytes in UTF-8 and the code for NEL has been used as the ellipsis ('…') character in Windows-1252. For instance:

  • YAML[4] no longer recognizes them as special in order to be compatible with JSON.
  • ECMAScript[5] accepts LS and PS as line breaks, but considers U+0085 (NEL) white space, not a line break.
  • Microsoft Windows 2000 does not treat any of NEL, LS or PS as line-break in the default text editor Notepad
  • In Linux, a popular editor "gedit" treats LS and PS as newlines but does not for NEL.

History[link]

ASCII was developed simultaneously by the ISO and the ASA, the predecessor organization to ANSI. During the period of 1963–1968, the ISO draft standards supported the use of either CR+LF or LF alone as a newline, while the ASA drafts supported only CR+LF.

The sequence CR+LF was in common use on many early computer systems that had adopted Teletype machines, typically a Teletype Model 33 ASR, as a console device, because this sequence was required to position those printers at the start of a new line. On these systems, text was often routinely composed to be compatible with these printers, since the concept of device drivers hiding such hardware details from the application was not yet well developed; applications had to talk directly to the Teletype machine and follow its conventions.

Most minicomputer systems from DEC used this convention. CP/M used it as well, to print on the same terminals that minicomputers used. From there MS-DOS (1981) adopted CP/M's CR+LF in order to be compatible, and this convention was inherited by Microsoft's later Windows operating system.

The separation of the two functions concealed the fact that the print head could not return from the far right to the beginning of the next line in one-character time. That is why the sequence was always sent with the CR first. In fact, it was often necessary to send extra characters (extraneous CRs or NULs, which are ignored) to give the print head time to move to the left margin. Even many early video displays required multiple character times to scroll the display.

The Multics operating system began development in 1964 and used LF alone as its newline. Multics used a device driver to translate this character to whatever sequence a printer needed (including extra padding characters), and the single byte was much more convenient for programming. The seemingly more obvious choice of CR was not used, as a plain CR provided the useful function of overprinting one line with another, and thus it was useful to not translate it. Unix followed the Multics practice, and later systems followed Unix.

In programming languages[link]

To facilitate the creation of portable programs, programming languages provide some abstractions to deal with the different types of newline sequences used in different environments.

The C programming language provides the escape sequences '\n' (newline) and '\r' (carriage return). However, these are not required to be equivalent to the ASCII LF and CR control characters. The C standard only guarantees two things:

  1. Each of these escape sequences maps to a unique implementation-defined number that can be stored in a single char value.
  2. When writing a file in text mode, '\n' is transparently translated to the native newline sequence used by the system, which may be longer than one character. When reading in text mode, the native newline sequence is translated back to '\n'. In binary mode, no translation is performed, and the internal representation produced by '\n' is output directly.

On Unix platforms, where C originated, the native newline sequence is ASCII LF (0x0A), so '\n' was simply defined to be that value. With the internal and external representation being identical, the translation performed in text mode is a no-op, and text mode and binary mode behave the same. This has caused many programmers who developed their software on Unix systems simply to ignore the distinction completely, resulting in code that is not portable to different platforms.

The C library function fgets() is best avoided in binary mode because any file not written with the UNIX newline convention will be misread. Also, in text mode, any file not written with the system's native newline sequence (such as a file created on a UNIX system, then copied to a Windows system) will be misread as well.

Another common problem is the use of '\n' when communicating using an Internet protocol that mandates the use of ASCII CR+LF for ending lines. Writing '\n' to a text mode stream works correctly on Windows systems, but produces only LF on Unix, and something completely different on more exotic systems. Using "\r\n" in binary mode is slightly better.

Many languages, such as C++, Perl,[6] and Haskell provide the same interpretation of '\n' as C.

Java, PHP,[7] and Python[8] provide the '\r\n' sequence (for ASCII CR+LF). In contrast to C, these are guaranteed to represent the values U+000A and U+000D, respectively.

The Java I/O libraries do not transparently translate these into platform-dependent newline sequences on input or output. Instead, they provide functions for writing a full line that automatically add the native newline sequence, and functions for reading lines that accept any of CR, LF, or CR+LF as a line terminator (see BufferedReader.readLine()). The System.getProperty() method can be used to retrieve the underlying line separator.

Example:

  String eol = System.getProperty( "line.separator" );
  String lineColor = "Color: Red" + eol;

Python permits "Universal Newline Support" when opening a file for reading, when importing modules, and when executing a file.[9]

Some languages have created special variables, constants, and subroutines to facilitate newlines during program execution.

Common problems[link]

The different newline conventions often cause text files that have been transferred between systems of different types to be displayed incorrectly. For example, files originating on Unix or Apple Macintosh systems may appear as a single long line on some Windows programs. Conversely, when viewing a file originating from a Windows computer on a Unix system, the extra CR may be displayed as ^M at the end of each line or as a second line break.

The problem can be hard to spot if some programs handle the foreign newlines properly while others do not. For example, a compiler may fail with obscure syntax errors even though the source file looks correct when displayed on the console or in an editor. On a Unix system, the command cat -v myfile.txt will send the file to stdout (normally the terminal) and make the ^M visible, which can be useful for debugging. Modern text editors generally recognize all flavours of CR / LF newlines and allow the user to convert between the different standards. Web browsers are usually also capable of displaying text files and websites which use different types of newlines.

The File Transfer Protocol can automatically convert newlines in files being transferred between systems with different newline representations when the transfer is done in "ASCII mode". However, transferring binary files in this mode usually has disastrous results: Any occurrence of the newline byte sequence—which does not have line terminator semantics in this context, but is just part of a normal sequence of bytes—will be translated to whatever newline representation the other system uses, effectively corrupting the file. FTP clients often employ some heuristics (for example, inspection of filename extensions) to automatically select either binary or ASCII mode, but in the end it is up to the user to make sure his or her files are transferred in the correct mode. If there is any doubt as to the correct mode, binary mode should be used, as then no files will be altered by FTP, though they may display incorrectly.

Conversion utilities[link]

Text editors are often used for converting a text file between different newline formats; most modern editors can read and write files using at least the different ASCII CR/LF conventions. The standard Windows editor Notepad is not one of them (although Wordpad and the MS-DOS Editor are).

Editors are often unsuitable for converting larger files. For larger files (on Windows NT/2000/XP) the following command is often used:

TYPE unix_file | FIND "" /V > dos_file

On many Unix systems, the dos2unix (sometimes named fromdos or d2u) and unix2dos (sometimes named todos or u2d) utilities are used to translate between ASCII CR+LF (DOS/Windows) and LF (Unix) newlines. Different versions of these commands vary slightly in their syntax. However, the tr command is available on virtually every Unix-like system and is used to perform arbitrary replacement operations on single characters. A DOS/Windows text file can be converted to Unix format by simply removing all ASCII CR characters with

tr -d '\r' < inputfile > outputfile

or, if the text has only CR newlines, by converting all CR newlines to LF with

tr '\r' '\n' < inputfile > outputfile

The same tasks are sometimes performed with awk, sed, Tr_(Unix) or in Perl if the platform has a Perl interpreter:

awk '{sub("$","\r\n"); printf("%s",$0);}' inputfile > outputfile  # UNIX to DOS  (adding CRs on Linux and BSD based OS that haven't GNU extensions)
awk '{gsub("\r",""); print;}' inputfile > outputfile              # DOS to UNIX  (removing CRs on Linux and BSD based OS that haven't GNU extensions)
sed -e 's/$/\r/' inputfile > outputfile              # UNIX to DOS  (adding CRs on Linux based OS that use GNU extensions)
sed -e 's/\r$//' inputfile > outputfile              # DOS  to UNIX (removing CRs on Linux based OS that use GNU extensions)
cat inputfile | tr -d "\r" > outputfile              # DOS  to UNIX (removing CRs using tr(1). Not Unicode compliant.)
perl -pe 's/\r?\n|\r/\r\n/g' inputfile > outputfile  # Convert to DOS
perl -pe 's/\r?\n|\r/\n/g'   inputfile > outputfile  # Convert to UNIX
perl -pe 's/\r?\n|\r/\r/g'   inputfile > outputfile  # Convert to old Mac

To identify what type of line breaks a text file contains, the file command can be used. Moreover, the editor Vim can be convenient to make a file compatible with the Windows notepad text editor. For example:

[prompt] > file myfile.txt
myfile.txt: ASCII English text
[prompt] > vim myfile.txt
  within vim :set fileformat=dos
             :wq
[prompt] > file myfile.txt
myfile.txt: ASCII English text, with CRLF line terminators

The following grep commands echo the filename (in this case myfile.txt) to the command line if the file is of the specified style:

grep -PL $'\r\n' myfile.txt # show UNIX style file (LF terminated)
grep -Pl $'\r\n' myfile.txt # show DOS style file (CRLF terminated)

For Debian-based systems, these commands are used:

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 above grep commands work under Unix systems or in Cygwin under Windows. Note that these commands make some assumptions about the kinds of files that exist on the system (specifically it's assuming only UNIX and DOS-style files—no Mac OS 9-style files).

This technique is often combined with find to list files recursively. For instance, the following command checks all "regular files" (e.g. it will exclude directories, symbolic links, etc.) to find all UNIX-style files in a directory tree, starting from the current directory (.), and saves the results in file unix_files.txt, overwriting it if the file already exists:

find . -type f -exec grep -PL '\r\n' {} \; > unix_files.txt

This example will find C files and convert them to LF style line endings:

find -name '*.[ch]' -exec fromdos {} \;

The file command also detects the type of EOL used:

file myfile.txt
> myfile.txt: ASCII text, with CRLF line terminators

Other tools permit the user to visualise the EOL characters:

od -a myfile.txt
cat -e myfile.txt
hexdump -c myfile.txt

dos2unix, unix2dos, mac2unix, unix2mac, mac2dos, dos2mac can perform conversions. The flip[10] command is often used.

See also[link]

References[link]

  1. ^ The origin of the older computer term "CRLF" - which redirects to this Newline article - or "Carriage Return [and] Line Feed", derives from standard manual typewriter design, whereby at the end of a line of text the typist pushes a lever at the left end of the carriage to return it to position for beginning the next line. In so doing, a mechanism also rolls the typewriter's platen by one line, advancing ("feeding") the paper to the correct position.
  2. ^ cr.yp.to
  3. ^ UTR #13: Unicode Newline Guidelines
  4. ^ YAML Ain't Markup Language (YAML™) Version 1.2
  5. ^ "ECMAScript Language Specification 5th edition". ECMA International. December 2009. p. 15. http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf. Retrieved 4 April 2010. 
  6. ^ binmode - perldoc.perl.org
  7. ^ PHP: Strings - Manual
  8. ^ Lexical analysis – Python v3.0.1 documentation
  9. ^ What's new in Python 2.3
  10. ^ ASCII text converstion between UNIX, Macintosh, MS-DOS

External links[link]

http://wn.com/Newline




This page contains text from Wikipedia, the Free Encyclopedia - http://en.wikipedia.org/wiki/Newline

This article is licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License, which means that you can copy and modify it as long as the entire work (including additions) remains under this license.