Set default encoding

@param string $encoding Default encoding to use.

@return void
330293
public function setEncoding($encoding)
    {
        $encoding = trim($encoding);
        if ($encoding !== '') {
            $this->flags .= " --default-encoding $encoding";
        } else {
            $this->flags = str_replace(
                ' --default-encoding ' . $this->encoding,
                '',
                $this->flags
            );
        }
        $this->encoding = $encoding;
    }
578207
private function setDefaultLocale($lang)
    {
        if ($lang === null) {
            $this->defaultLanguage = $this->languages[0];
            return;
        }

        if (!$this->hasLocale($lang)) {
            if (!is_string($lang)) {
                $lang = is_object($lang) ? get_class($lang) : gettype($lang);
            }

            throw new InvalidArgumentException(sprintf(
                'Unsupported default language; must be one of "%s", received "%s"',
                implode(', ', $this->availableLocales()),
                $lang
            ));
        }

        $this->defaultLanguage = $lang;
    }
1042257
public function isAcceptEncoding($encoding)
    {
        if ($this->hasHeader('Accept-Encoding')) {
            return $this->isAccept($this->getHeader('Accept-Encoding'), $encoding);
        }
        return false;
    }
914338
public static function setContentType($contentType, $encoding = null) {
		$value = $contentType;
		if (isset ( $encoding ))
			$value .= ' ;charset=' . $encoding;
		self::header ( 'Content-Type', $value );
	}
567777
def update_encoding(self, encoding):
        """"""
        value = str(encoding).upper()
        self.set_value(value)
507488
public function setLanguage($language)
    {
        if (!array_key_exists($language, $this->allowedlanguages)) {
            throw new InvalidArgumentException("Invalid language ISO code");
        }
        $this->parameters['language'] = $language;
    }
395014
public function __tearup(
        $cipher = null,
        $encoding = null
    ) {
        // Check for defaults from configuration
        if (null === $cipher) {
            $cipher = $this->getRegistry()->getConfiguration()->crypt->cipher->default;
        }

        if (null === $encoding) {
            $encoding = $this->getRegistry()->getConfiguration()->crypt->encoding->default;
        }

        $cipherAvailable   = object_to_array($this->getRegistry()->getConfiguration()->crypt->cipher->available);
        $encodingAvailable = object_to_array($this->getRegistry()->getConfiguration()->crypt->encoding->available);
        $encodingMapping   = object_to_array($this->getRegistry()->getConfiguration()->crypt->encoding->mapping);

        $this
            ->cipherAvailable($cipherAvailable)
            ->encodingAvailable($encodingAvailable)
            ->encodingMapping($encodingMapping)
            ->cipher($cipher)
            ->encoding($encoding);
    }
1366193
public function setDefaultIndentation($indentation)
	{
		$ind = '';
		for ($i=0; $i < (int) $indentation; $i++)
		{
			$ind .= ' ';
		}
		$this->defaultIndentation = $ind;
	}
899670
public function setSourceLanguage(string $language): void
    {
        $this->xliff->setSourceLanguage($language);
        $this->markChanged();
    }
1371499
public function setEncoding($encoding = null)
    {
        if ($encoding !== null) {
            $orig = PHP_VERSION_ID < 50600
                        ? iconv_get_encoding('internal_encoding')
                        : ini_get('default_charset');
            if (PHP_VERSION_ID < 50600) {
                $result = iconv_set_encoding('internal_encoding', $encoding);
            } else {
                $result = @ini_set('default_charset', $encoding);
            }
            if (!$result) {
                require_once 'Zend/Validate/Exception.php';
                throw new Zend_Validate_Exception('Given encoding not supported on this OS!');
            }

            if (PHP_VERSION_ID < 50600) {
                iconv_set_encoding('internal_encoding', $orig);
            } else {
                @ini_set('default_charset', $orig);
            }
        }

        $this->_encoding = $encoding;
        return $this;
    }
1184421
public function setLanguage(Language $language)
    {
        $this->language = $language;
        $this->languageId = $language->getLanguageId();
    }
843263
public void setEncoding(String encoding)
  {
    _charEncoding = encoding;

    String javaEncoding = Encoding.getJavaName(encoding);

    if ("ISO8859_1".equals(javaEncoding))
      _charEncoding = null;
  }
1142614
public function setCharset($charset) {
		if (!$this->isOpen) return;
		$this->charset=$charset;
		$this->conn1->set_charset($this->charset);
	}
1311201
protected function getEncoding($encoding=null)
    {
        if(is_null($encoding))
        {
            if(!is_null($this->encoding))
            {
                return $this->encoding;
            }
            return self::getDefaultEncoding();
        }
        return $encoding;
    }
1364591
public function setEncoding($encoding)
    {
        $this->connect();
        $this->_connection->exec('SET NAMES ' . $this->_connection->quote($encoding));
    }
140158
protected void setDefaultEncoding(String encoding) {

        m_defaultEncoding = encoding.intern();
        if (CmsLog.INIT.isInfoEnabled()) {
            CmsLog.INIT.info(Messages.get().getBundle().key(Messages.LOG_SET_DEFAULT_ENCODING_1, m_defaultEncoding));
        }
    }
732079
public static function setCharSet($charset) {
        self::init();
        if(!self::$_db) {
            self::connect();
        }
        self::$_env->setCharset($charset);
    }