Skip to content

Commit

Permalink
Use correct encoding for man pages
Browse files Browse the repository at this point in the history
We generate UTF-8 man pages and set ‘charset=UTF-8’ using the <meta> tag, but WebKit ignores this.

I also tried to set the ‘com.apple.TextEncoding’ extended attribute (to UTF-8), but this is ignored as well.

So the only fix was to include a “byte order mark” (BOM) in the file.
  • Loading branch information
sorbits committed Aug 17, 2012
1 parent 998b8e0 commit f06d365
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Support/shared/bin/man2html
Expand Up @@ -9,6 +9,8 @@ else
name = '(unknown)'
end

STDOUT << [0xFEFF].pack("U*") # Output UTF-8 ByteOrderMark since this is the only way I have been able to make WebKit show the file as UTF-8. It ignores the <meta> tag and it also ignores the com.apple.TextEncoding extended attribute.

STDOUT << <<-HTML
<html>
<head>
Expand Down

0 comments on commit f06d365

Please sign in to comment.