@@ 117-126 (lines=10) @@ | ||
114 | $data = $this->getData(); |
|
115 | if ($this->getCharset() === null && !$this->numChildren()) |
|
116 | { |
|
117 | if (is_string($data) && Swift_Message_Encoder::instance()->isUTF8($data)) |
|
118 | { |
|
119 | $this->setCharset("utf-8"); |
|
120 | } |
|
121 | elseif (is_string($data) && Swift_Message_Encoder::instance()->is7BitAscii($data)) |
|
122 | { |
|
123 | $this->setCharset("us-ascii"); |
|
124 | if (!$enc) $this->setEncoding("7bit"); |
|
125 | } |
|
126 | else $this->setCharset("iso-8859-1"); |
|
127 | } |
|
128 | elseif ($this->numChildren()) |
|
129 | { |
@@ 787-796 (lines=10) @@ | ||
784 | if ($this->getCharset() === null && !$this->numChildren()) |
|
785 | { |
|
786 | Swift_ClassLoader::load("Swift_Message_Encoder"); |
|
787 | if (is_string($data) && Swift_Message_Encoder::instance()->isUTF8($data)) |
|
788 | { |
|
789 | $this->setCharset("utf-8"); |
|
790 | } |
|
791 | elseif(is_string($data) && Swift_Message_Encoder::instance()->is7BitAscii($data)) |
|
792 | { |
|
793 | $this->setCharset("us-ascii"); |
|
794 | if (!$enc) $this->setEncoding("7bit"); |
|
795 | } |
|
796 | else $this->setCharset("iso-8859-1"); |
|
797 | } |
|
798 | elseif ($this->numChildren()) |
|
799 | { |