I came across an issue where a function I found on the internet was escaping with \0. Per the standards the octal code range can go from 0 to 377.
This line will cause and exception if you use \0 or \00.
string octalCode = text.Substring(slashIndex + 1, 3);
Here is the fixed code.
string octalCode = "";
for (int i = 1; i < 4; i++)
if (slashIndex + i > text.Length) break;
var c = text[slashIndex + i];
if (Char.IsDigit(c)) octalCode += c;