Skip to content

Commit 20b272d

Browse files
committed
Added charset setting
1 parent 12e94ac commit 20b272d

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

reference/configuration/kernel.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,36 @@ the parent :class:`Symfony\\Component\\HttpKernel\\Kernel` class.
1111
Configuration
1212
-------------
1313

14+
* `Charset`_
1415
* `Kernel Name`_
1516
* `Root Directory`_
1617
* `Cache Directory`_
1718
* `Log Directory`_
1819

20+
.. versionadded:: 2.1
21+
The :method:`Symfony\\Component\\HttpKernel\\Kernel::getCharset` method is new
22+
in Symfony 2.1
23+
24+
Charset
25+
~~~~~~~
26+
27+
**type**: ``string`` **default**: ``UTF-8``
28+
29+
This returns the charset that is used in the application. To change it, override the
30+
:method:`Symfony\\Component\\HttpKernel\\Kernel::getCharset` method and return another
31+
charset, for instance::
32+
33+
// app/AppKernel.php
34+
35+
// ...
36+
class AppKernel extends Kernel
37+
{
38+
public function getCharset()
39+
{
40+
return 'ISO-8859-1';
41+
}
42+
}
43+
1944
Kernel Name
2045
~~~~~~~~~~~
2146

0 commit comments

Comments
 (0)