Skip to content

Commit 6266415

Browse files
authored
Added code example for ModPerl 2 (#357)
1 parent 4a0b893 commit 6266415

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

articles/http-charset/index.en.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ <h2>Scripting the header</h2>
105105
<p><strong class="leadin">Perl.</strong> Output the correct header before any part of the actual page. After the last header, use a double
106106
linebreak, e.g.:<br />
107107
<code>print "Content-Type: text/html; charset=utf-8\n\n";</code></p>
108+
<p><strong class="leadin">ModPerl 2.</strong> Set the correct header before sending any part of the actual page, e.g.:<br />
109+
<code>$r->content_type('text/html; charset=utf-8');</code></p>
108110
<p><strong class="leadin">Python.</strong> Use the same solution as for Perl (except that you don't need a semicolon at the end).</p>
109111
<p><strong class="leadin">PHP.</strong> Use the <a class="print" href="http://www.php.net/header">header()</a> function before generating any content,
110112
e.g.: <br />

0 commit comments

Comments
 (0)