Apostrophe is showing up as ’ in windows, chrome browser - html

I have a static app that uses react & html5. I have <meta charset="utf-8"> in the head of my index.html file. BUT for some reason, apostrophe's are being rendered as ’. This does not happen locally. It only happens on a windows computer. Does anyone know why?

Related

Icons/emojis not rendering in browser and displaying symbols when displaying page in browser while running from WebStorm IDE

I am developing a HTML page. I have a book icon in the page under <h1> tag. File name is index.html. When I run the page directly by double clicking it... it displays the book icon on the browser. When I run the page by clicking Firefox icon from inside WebStorm IDE... it displays some symbols instead of book icon.
Is it because of WebStorm or did I miss anything in HTML??
Below are the screenshots:
WebStorm IDE screenshot with book icon
Output displayed on the browser
I tried to solve this by going through the JetBrains documentation. Couldn't find a solution.
My expected result is... the icons which are placed in the HTML file should be displayed properly in browser when running it from WebStorm IDE.
By directly using the html-code for the blue book emoji, we can achieve this effect:
<h1>📘 The Code Magazine</h1>
To the above-mentioned problem given below is the answer.
<head>
<meta charset="UTF-8"/>
<title>The Basic Language of the web: HTML</title>
</head>
I added the <meta charset="UTF-8"/> inside the head tag to mention the character set and it solved the problem.

GAE Getting Started with Flask (empty firefox browser)

I just went through the Getting Start with Flask on App Engine Standard Environment tutorial. The source code is here.
Firefox and Chrome both the html templates but neither render them when running locally:
dev_appserver.py app.yaml
or in the cloud
gcloud app deploy
The FireFox Developer Tools console tells me that:
The character encoding of the HTML document was not declared. The
document will render with garbled text in some browser configurations
if the document contains characters from outside the US-ASCII range.
The character encoding of the page must be declared in the document or
in the transfer protocol.
I tried adding declaring UTF-8 encoding by adding this line to the html files.
<html>
<head>
<meta charset="utf-8"/>
...
but to no avail. Any ideas?
Thanks!
I don't think this is the reason your template is not rendering. But, to get rid of that error, try:
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
To troubleshoot your template, please provide your url handlers, view handler, and template.html

Make a html or xhtml page with svg displayed in local

I have a html page which have a svg. I use Chrome 54.0.2840.98 (64-bit) as web browser in Mac OS.
The svg is displayed well with localhost, whereas it is not displayed when i specify file:///Users/softtimur/... in the browser path.
I have searched some threads, some suggested to change the page to xhtml, I did it. And make the header as follows:
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
But the svg is still not shown in local.
Could anyone help?
PS: Here is the file. After downloading it, you may need to change the name test.xhtml.txt to test.xhtml.
Edit: This thread mentions that Chrome may block the access to local documents (Object in your case) from remote scripts (svg-pan-zoom). Is there a way that I rewrite the page to find a workaround? Or could I do something about Chrome settings? I really don't want to use localhost.
As Chainat and I discovered (in comments), the key is to write <script src="http://d3js.org/d3.v3.min.js"></script> (over <script src="d3js.org/d3.v3.min.js"></script>) if one wants to use external d3. Then even a html file without <html xmlns="http://www.w3.org/1999/xhtml"><meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" /> works...
First of all.
SVG's Doctype will not start with html.
svg doctype is
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
Here is the link for "Doctype's" [https://www.w3.org/QA/2002/04/valid-dtd-list.html][1].
Could you conduct another test, like opening SVG file from folder, if windows then windows explorer, by double clicking the file. It should open in your default web browser.
I have not seen this when I open my files "file:///", instead I see Drive "C:/" like this.

Document mode defaults to 8, though using IE11. Why?

I have a problem that my webpage does not display as i wish it to do.
When opening the F12 developers tool in IE11 it says "Document mode: 8 (Default)".
If i change it to mode 9 or higher the page displays as i want it to do.
My code is included in the host web page through an Iframe. I do unfortunatly not have access to edit the host code. The host code includes the code:
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
I thought this code would ensure that the code was not shown in document 8? The code is included at the end of the head tag, with 88 lines of code in front of it. Could this be what is causing it to use document mode 8? How can i work around this when i am not able to edit the head code?

UTF-8 unreadable in phonegap android

I'm working on my first phonegap application, an android based simple form app.
My problem is that all my non-latin characters appear unreadable.
I added the content meta tag with utf-8, made sure I saved the file as utf-8, made sure to use font with the needed letters and also added xml:lang to the decleration.
Couldn't find any other idea, because i'm a web dev and this usually solves these issues...
Maybe someone has any idea?
feels like my questions back when I just started web development :)
Thanks!
Just add meta:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
If you are using Eclipse, which is default for the PhoneGap Android, make sure you applied the utf-8 text file encoding. (Project - Properties - Resource: Text File Encoding - Other [UTF-8]).
The meta tag should also be in your index.html
<head>
<meta charset=utf-8>
...
</head>
sometime it happens from visual studio page Unicode setting: for this go to file > advance save options > select Unicode utf 8 with signature and then click ok.