Help for this page

Select Code to Download


  1. or download this
    AddCharset UTF-8 html
    
  2. or download this
    <?xml version="1.0" encoding="utf-8" ?> 
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w
    +3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    ...
        <head>
            <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"
    + />
    
  3. or download this
    use utf8; # to state that the script itself is in utf8 
    binmode STDIN, ":encoding(utf8)"; 
    binmode STDOUT, ":encoding(utf8)"; 
    use as_utf8; # which is the hack posted at http://www.perlmonks.org/?n
    +ode_id=651574
    
  4. or download this
    # Connect to the database
    my $dbh = DBI->connect($dsn, $user, $password, { RaiseError => 1, Auto
    +Commit => 0, mysql_enable_utf8 => 1 }) 
    ...
    
    my $sql = qq{SET NAMES 'utf8' COLLATE 'utf8_swedish_ci';};
    $dbh->do($sql);
    
  5. or download this
    SHOW VARIABLES LIKE 'c%' gives me the following output:
    Variable_name  Value  
    ...
    completion_type 0 
    concurrent_insert 1 
    connect_timeout 5
    
  6. or download this
    Törjebjöåärne Ålandssäöna
    
  7. or download this
    Törjebjöåärne Ã&#133;landssäöna
    
  8. or download this
    use Encode;
    decode_utf8($tmpl->output);