Sunday 28 October 2018

accessibility - How do I encode WebVTT document as UTF-8 and MIME type="text/vtt"?




"A WebVTT file must consist of a WebVTT file body encoded as UTF-8 and labeled with the MIME type text/vtt."
whatwg source: http://www.whatwg.org/specs/web-apps/current-work/webvtt.html



i figure i need to set .htaccess? i'm on apache/php/mysql.


Answer



Replace AddDefaultCharset ISO-8859-1 with AddDefaultCharset UTF-8 in the Apache.conf file.



If using .htaccess for configuration use something similar to:





AddType "text/html; charset=UTF-8" html


No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...