getCharset() public method

Gets the current charset as defined by the content type.
public getCharset ( ) : string
return string The current charset
 /**
  * Convert the symfony 1.4 response to a Response.
  * @param  \sfWebResponse $legacyResponse
  * @return Response
  */
 private function convertResponse($legacyResponse)
 {
     $response = new Response($legacyResponse->getContent(), $legacyResponse->getStatusCode());
     $response->setCharset($legacyResponse->getCharset());
     $response->setStatusCode($legacyResponse->getStatusCode());
     foreach ($legacyResponse->getHttpHeaders() as $headerName => $headerValue) {
         $response->headers->set($headerName, $headerValue);
     }
     return $response;
 }