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>
Related
I am developing a game using HTML. I found a font I want to use. I installed it correctly on the computer, and I imported it into the CSS file, however; I am unable to use the character that I specifically wanted from the font. It loads in the editor, but not when the page renders on the frontend.
The character I really like is &
My browser that I load my webpage with is Chrome.
The editor that I can see the character in is Visual Studio Code.
I use the VS Code Live Server to load the page into chrome, and Icon Font File Preview extensions.
How do I resolve the issue? What information should I add?
I have a HTML file that renders correctly in Chrome 66 when the file extension is ".html", so I know that the code if fine.
However, the process that generates the code defaults to an extension of ".DAT" and there isn't a way to change it. Also, I tried associating ".DAT" with Chrome, but the page still shows code instead of rendering.
When I was using an older version of Chrome (50 something) it was rendering the pages properly. How can I get ".DAT" files to render correctly in my newer version?
I have the same behaviour today with one of our users.
Some DAT files with html coding are displayed as loose html code instead of being rendered.
If I open it in IE it works fine.
I have the following code in a html document:
<p>PDF sample</p>
<object data="http://www.whateverdomain.com/whatever/~/media/sample.pdf" type="application/pdf"></object>
This is working in IE, Firefox but not in Chrome. Appears a grey box in the browser with no embedded pdf. When I check on "network" tab in chrome I'm receiving a HTTP 200 response but PDF is not shown.
I tried URL encode tilde "~" symbol replacing it by %7e but still its not working on Chrome.
I don't have the possibility of changing the url which is provided by an external service.
Do you have any clue on how to solve ?
You might wish to try and use a simple iframe. At the very least I am pretty sure that works for chrome, might not work for IE though. Another alternative is using the Google Docs viewer, with that you are sure to be cross browser compatible, although some pdf's might not render perfectly. The last option you have is using something like pdf.js to render the pdf's yourself inside the browser. Gives you a lot of control and ensures that even people running computers without a pdf viewer installed (or a native pdf viewer like chrome and firefox) will be able to view the file.
I have a a PDF that has been created, it should be in Chinese which when I view it in the Chrome Browser it works perfectly. However, when you open it in Firefox it displays in Korean (!). What has happened that would mean this could happen?
http://www.jaguar.com.cn/Images/XF_14MY_MB_CHI_tcm100-58191.pdf
This can happen either just using the file in the link, or by downloading the file and then dragging it into the browser window.
Much appreciated.
In Acrobat, it shows in chinese.
There may be one problem with the document, which is that not all fonts are marked as embedded. Those CID fonts do have a specific encoding. It is now possible that the Firefox PDF viewer is improperly interpreting the font family to use and/or the encoding.
In short, just so, I don't see much you can do about the document. OK, one thing which might help would be checking the font options for Firefox.
I have a HTML fragment file which was created by extracting the Windows CF_HTML clipboard data after having copied a web page (http://www.w3schools.com/) in MSIE to the clipboard. The HTML fragment source is located here:
http://pastebin.com/suJDw9tW
Now when I open this file in Chrome, it displays the web page perfectly with all images.
However, when I try to open it in MSIE, it first seems to crash MSIE or make it hang for about 5-10 seconds, then the page is displayed very badly and WITHOUT IMAGES although there is a BASE tag inside the HTML.
How do I need to change this HTML to make it display correctly in MSIE WITH IMAGES?
Document type declaration should be on the first line without any preceeding characters.
This probably provides more backwards compatibility with older versions of IE. Those are just quite widely used even today, unlike older versions of the other browsers.