1

I want to save a SPACE character in an ini file and echo it in PHP. According to the information about INI Files escape characters in the Wikipedia (https://en.wikipedia.org/wiki/INI_file#Escape_characters) i tried to use the value char = \x20 and char = \x0020 but it is not working.

Is it because of PHP or do I make something wrong?

TheEquah
  • 121
  • 8
  • I found out that `char = " "` works. But I still would like to know, to to define a Unicode character by it's hex value. – TheEquah May 02 '16 at 17:50
  • You can just put the UTF8 character into the INI file, otherwise you'll need to [replace the escape sequences yourself](http://stackoverflow.com/questions/2934563/how-to-decode-unicode-escape-sequences-like-u00ed-to-proper-utf-8-encoded-cha). Unless you're displaying the text in a terminal or something that doesn't handle the escape sequences itself you should just leave them in and let the browser handle them. – Sammitch May 02 '16 at 19:00
  • It's also worth noting that there is no standard defining an INI file's syntax, only a loose set of conventions that may or may not be used in a particular implementation. As well, the `\x##` format of escape sequence generally denotes hex-encoded literal binary values, whereas `\u####` denotes unicode codepoints. – Sammitch May 02 '16 at 19:11

0 Answers0