2

Decode The following string to proper human readable string using PHP

=?UTF-8?Q?=F0=9F=8E=81Congratulation_Dear,You_are=5FSelected_for=5FOnline?= =?UTF-8?Q?=F0=9F=8E=81cash=5Floan_upto=F0=9F=8E=8110,000/-?=
  • define "get subject", where are you getting it from, how are you getting it? We can't read minds! – Martin Jul 26 '17 at 10:57
  • roundcube has internal functions to acess mail related properties –  Jul 26 '17 at 10:59

1 Answers1

4

Use the PHP function imap_mime_header_decode() to decode it.

For the string posted in the question it returns this:

Array
(
    [0] => stdClass Object
        (
            [charset] => UTF-8
            [text] => Congratulation Dear,You are_Selected for_Online
        )

    [1] => stdClass Object
        (
            [charset] => UTF-8
            [text] => cash_loan upto10,000/-
        )

)

The unprintable character (U+1F381) represents, according to unicode.org, a "wrapped present". It could look like this if displayed using a font that contains it.

axiac
  • 68,258
  • 9
  • 99
  • 134