Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

specify the character encoding #20

Open
DanGrayson opened this issue Feb 13, 2018 · 0 comments
Open

specify the character encoding #20

DanGrayson opened this issue Feb 13, 2018 · 0 comments

Comments

@DanGrayson
Copy link

The validator complains if we don't specify a character encoding. A change like this might be good, for we can also tell emacs the character encoding to use:

diff --git a/html.ml b/html.ml
index 33b8cac..a12b5b5 100644
--- a/html.ml
+++ b/html.ml
@@ -23,7 +23,9 @@ let css = ref None
 
 let open_document ch ftitle =
   output_string ch
-    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n\n";
+    "<?xml version=\"1.0\" encoding=\"utf-8\"?> <!-- -*- coding: utf-8 -*- -->\n";
+  output_string ch
+    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n\n";
   output_string ch "<html>\n\n<head>\n";
   output_string ch "<title>"; ftitle(); output_string ch "</title>\n";
   begin match !css with
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant