Comments (6)
I'm not sure if I'm reproducing this correctly. I tried using the ISO-8859-1
charset for the file and as a head tag, but I'm seeing the symbol in live preview. Can you paste your code?
from vscode-livepreview.
Hi.
I have insolated the problem and made a small demo. It all comes down to the load() method. In the demo I have one div tag in the (main) demo.html and the same in "include.html", which is loaded below the first. My demo fails to display the loaded text correct, but it displays fine when run in Chrome. If I out-comment line 19 it's just the opposite.
I have include the project as a zip file!
LivePreviewDemo.zip
from vscode-livepreview.
Hmm, I noticed that if I set the encoding in the editor, it displays correctly. Have you tried this out?
from vscode-livepreview.
I always have charset ISO-8859-1 in the VS Code editor as you can se below. And I notice, that it doesn't display correct in your screen dump either! Here is my screen dump with the same page shown in Chrome (after hitting F5) on the right side.
I just noted that there is a difference in the "letters" displayed:
with line 19 active: ������
without line 19: ������
Could it be some kind of double conversion - from UTF-8 to iso 8859-1 and then again from what is supposed to be UTF-8 to iso 8859-1?
ps. When I first started coding, VS code was set to UTF-8 as standard and I typed in some danish letters which looked fine until I ran the html page. The I changed the charset in the editor which made it all unreadable. So I had to retype the special characters. Could I be that your VS code was opened with UTF-8 on my code?
from vscode-livepreview.
I have a feeling that it might be an issue with how I host the content
I will need to experiment with this to see whether it's the cause or whether there's a better way to set this.
from vscode-livepreview.
I've noticed something similar.
If I save a testlatin.html
webpage with Latin1 (ISO-8859-1) charset encoding, then when I get it via the server
curl -v http://127.0.0.1:3000/testlatin.html | od -t x1z
I get it in UTF-8.
Not only the http header says Content-Type: text/html; charset=UTF-8
, but the content itself appears to have been converted to UTF-8. The meta tag <meta charset="ISO-8859-1" />
has no effect.
I dont't know who is doing the conversion, but it seems confusing.
from vscode-livepreview.
Related Issues (20)
- Can't find the live preview icon HOT 15
- Open from a script HOT 13
- it is not working HOT 1
- The IP address "192.168.XXX.9" cannot be used to host the server. Using default IP 127.0.X.X. HOT 2
- it is not working properly HOT 1
- Live Preview Button not showing HOT 8
- Feature Request: Support for multiple Live Preview Windows HOT 1
- live preview not showing up while using Github Repositories extension HOT 1
- just white,cannot work normal HOT 8
- preview HOT 3
- Click on tags/elements in HTML and jump to it in HTML document HOT 2
- live server HOT 1
- Launch as http://localhost instead of http://127.0.0.1? HOT 6
- PHP support HOT 1
- It becomes Dark!!! HOT 1
- xaml后续能支持吗 HOT 1
- An unknown error occurred. Please consult the log for more details. HOT 2
- Not working HOT 11
- Add a "Start Preview" button HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-livepreview.