D
D
dienerie2021-06-10 10:06:33
Character encoding
dienerie, 2021-06-10 10:06:33

What is the UTF-8 (hex.) code for a newline?

Please help me find a table where it is described or the code itself

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
datka, 2021-06-10
@dienerie

Ok Google : hex utf8 newline

Unicode Character 'SYMBOL FOR NEWLINE' (U+2424)

G
galaxy, 2021-06-11
@galaxy

For reasons of backward compatibility, the Unicode standard defines several characters (character combinations) after which there is a mandatory newline


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)
LF : Line Feed (U+000A )
NEL : Next Line, U+0085
LS : Line Separator, U+2028
PS : Paragraph Separator, U+2029

(however, the carryover effect for VT and NEL is not obligatory to be performed when implementing the standard).
In practice, UTF-8 usually uses the same characters for line breaks as in ASCII (they are encoded in the same way as in ASCII):
  • CR : Carriage Return, UTF-8: 0x0D
  • LF : UTF-8: 0x0A
  • CR+LF: UTF-8: 0x0D0A

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question