I'd like to generate Web VTT subtitle files for a video about HTML.
But I can't figure out how to show the string & in Firefox. This works fine in Chromium 89.0 (it shows &):
00:00.000 --> 00:02.000
&
But Firefox 87.0 shows just &.
Related
I was sent an HTML file to evaluate. The first line looks like:
<h1>myCompanyName<sup>™</sup></h1>
Which renders as myCompanyName™.
When I open this file in Chrome or Firefox, the trademark symbol renders fine. However, in Safari, it renders like:
myCompanyNameâ„¢.
Why is Safari interpreting this small 'TM' as â„¢ , and what can I do to avoid this?
Interestingly, if I paste this same code into a Visual Studio Code web app and serve it, it renders properly on all browsers regardless. Only when opening the HTML file on its own via 'open with browser' does it mess up in Safari.
The encoding isn't declared correctly. A UTF-8-encoded ™ decoded as Windows-1252 displays as â„¢.
A proof using Python:
>>> print('™'.encode('utf8').decode('windows-1252'))
â„¢
Try, as a minimum:
<meta charset="utf-8"><h1>myCompanyName<sup>™</sup></h1>
In an application I generate Web VTT video subtitle files using input from users and other data sources.
Generally this works fine, but I can't figure out how to show a subtitle line in Firefox starting with the string "NOTE". Example:
00:00.000 --> 00:02.000
NOTE A
This should show the subtitle "NOTE A" for the first two seconds. In Chromium 89.0 this works fine, but Firefox 87.0 doesn't show anything.
I also can't find a hint for escaping "NOTE" here: https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API
We are embedding a PDF document on the page using the following:
<object ng-attr-data="data:application/pdf;base64,{{doc.DocumentBase64}}"
type="application/pdf" style="width:100%;height:600px" />
{{doc.DocumentBase64}} will be replaced by a Base64 string of the PDF file contents.
The document shows up fine in Chrome and Firefox. However, in IE and Edge, it just shows a blank white area where the is supposed to be.
Anything special that we are overlooking which needs to be done for IE & Edge when using tag and data url is a base 64 string?
I have a PDF file embedded into a standard html web page.
<h3>Foo</h3>
<object id="foo" data="bigboundingbox.pdf"
type="application/pdf"
classid="clsid:CA8A9780-280D-11CF-A24D-444553540000"> </object>
This currently renders in Internet Explorer using the Adobe Reader plugin on windows. Firefox and Chrome appear to be using their internal PDF rendering engines.
In all 3 cases the page displays with the Foo header visible above the contents of the PDF.
When a user tries to print the page (File->print), the PDF being rendered does not display in the resulting printed document in Internet Explorer or Chrome.
Firefox appears to display correctly.
I have tried using PDFObject in order to embed this with the same result
There are other posts recommending using PDF.js etc.. however I must support IE 7 and IE 8 and PDF.js will not work at all with 7 and works with limited success with 8.
Does anyone know why this happens and if there is anything i can modify so that it will print ?
You can use fpdf for that. Have a look at fpdf here
When I paste this url in the Safari address bar, the result I get is mangled - the text-to-speech is pronouncing characters that aren't there (like the copyright sign). But when I paste the url in Chrome, I get the correct response (which is an mp3 of the pronunciation of the word "éliminé".)
It looks like Safari unescapes the string before sending.
What goes wrong in Safari, and is there a fix?