Tag Info

New answers tagged

2

Using just Bash: 3.1.2.4 ANSI-C Quoting Words of the form $'string' are treated specially. The word expands to string, with backslash-escaped characters replaced as specified by the ANSI C standard. Backslash escape sequences, if present, are decoded as follows: … \nnn the eight-bit character whose value is the octal value nnn (one ...


3

If you have these escape sequences in a shell variable, in dash, mksh or bash: printf %b "$string_with_backslash_escapes" This isn't POSIX: the %b specifier is POSIX but it requires a 0 after each backslash. This also interprets other backslash escapes: \n as a newline, \t as a tab, etc. Here's a perl one-liner that converts octal escape sequences only. ...


1

Python in the interactive shell can do at least some of this. But the sequence above appears to be corrupted: wilmer@ruby:~$ python Python 2.7.10 (default, Jul 1 2015, 10:54:53) [GCC 4.9.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> unicode("\350\207\252\345\212\250\346\216", "utf-8") Traceback (most recent call ...


0

Are you running php? I think your problem is not in apache httpd.conf but in php.ini. See this: http://php.net/manual/en/ini.core.php#ini.default-charset "In PHP 5.6 onwards, "UTF-8" is the default value and its value is used as the default character encoding ..."



Top 50 recent answers are included