What is the UTF-8 representation of “end of line” in text file

There are a bunch:

  • LF: Line Feed, U+000A (UTF-8 in hex: 0A)
  • VT: Vertical Tab, U+000B (UTF-8 in hex: 0B)
  • FF: Form Feed, U+000C (UTF-8 in hex: 0C)
  • CR: Carriage Return, U+000D (UTF-8 in hex: 0D)
  • CR+LF: CR (U+000D) followed by LF (U+000A) (UTF-8 in hex: 0D 0A)
  • NEL: Next Line, U+0085 (UTF-8 in hex: C2 85)
  • LS: Line Separator, U+2028 (UTF-8 in hex: E2 80 A8)
  • PS: Paragraph Separator, U+2029 (UTF-8 in hex: E2 80 A9)

…and probably many more.

The most commonly used ones are LF (*nix), CR+LF (Windows and DOS), and CR (old pre-OSX Mac systems, mostly).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)