What does the \x1a
character mean and why does mysql_real_escape_string
escape it?
From the documentation:
mysql_real_escape_string() calls MySQL's library function mysql_real_escape_string, which prepends backslashes to the following characters: \x00, \n, \r, \, ', " and \x1a.
A ASCII Characters reference describes it as Substitute character
, but this doesn't say much.
Best Answer
It's a Unicode escape sequence, in hexadecimal (base 16).
\x1a
is the "substitute" character.See also: https://en.wikipedia.org/wiki/Substitute_character
According to the documentation,