Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I saw string like this:

print "\353\257\274\354\243\274\355\231\224!"

is it hexademical or demical? and is it unicode codepoint? what is difference between \x<number> and \<number> ? sorry for english

Replies are listed 'Best First'.
Re: What is backslash and number means in string
by Your Mother (Archbishop) on Feb 27, 2015 at 23:47 UTC
    perl -le 'print "\353\257\274\354\243\274\355\231\224!"'
    민주화!

    Hmmm… Democratization… Funny day.

Re: What is backslash and number means in string
by Anonymous Monk on Feb 27, 2015 at 23:41 UTC
    UTF-8 bytes in octal notation. See perlop.
Re: What is backslash and number means in string
by ikegami (Patriarch) on Feb 28, 2015 at 16:05 UTC

    is it hexademical or demical?

    Close. It's octal. Base 8. All of these are equivalent:
    "\353" oct("353") chr(3 * 8**2 + 5 * 8**1 + 3 * 8**0)

    what is difference between \x<number> and \<number> ?

    They're basically the same, except the number is hex in "\x00" and octal in "\000"

    and is it unicode codepoint?

    Each of the sequences creates a character (a string element). You could use these sequences to create Unicode Code Points, but that's now what they are used for in this case. They are used to create the bytes that form the UTF-8 encoding of some Chinese text.