I need a PHP code that would convert control characters to graphical (like U+0000 to ␀ (U+2400)). Unicode 0000-001F should be replaced with unicode 2400-241F. I am writing a PHP code that would show the contents of the file.
Asked
Active
Viewed 187 times
0
-
@Leigh I don't know what I should try lol. – gskartwii Sep 20 '12 at 17:40
-
What are the Unicode values of the characters you want to replace? What **exactly** do you want to replace them with? – Jocelyn Sep 20 '12 at 18:03
-
have you tried `str_replace(chr(0), '␀', $yourText)`? – Gordon Sep 20 '12 at 18:05
-
@Gordon I don't think is useful. I would need to do that for every character. For Jocelyn, those characters in unicode 0000-001F should be replaced with unicode 2400-241F – gskartwii Sep 20 '12 at 18:10