Comments (13)
Thanks for showing me how to change the encoding! The change appears to fix things on my machine, and we can know for sure when the next round of binaries come out. If there are any other open alpha issues, point them out to me. It'd be great to get that all done before the next round!
from virtual-dom.
In Chrome, go to View -> Encoding and you can select a specific encoding. If I select Unicode (UTF-8), then the unicode triangles in the debug pane render properly. But if I select Western (which was my default for some reason), then they don't render properly. However, the triangles here render properly whether I use Unicode or Western encoding.
Does that help?
from virtual-dom.
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
from virtual-dom.
Thanks for the report! Are you using a custom monospace font? They should be the characters ▸ ▾ … which all appear fine for me in macOS in Chrome and Safari.
from virtual-dom.
Ah, it turns out both Safari and Chrome were using a default encoding of "Western". Switching both to "Unicode (UTF-8)" solved the problem. Strange thing is I have no idea why "Western" was the default encoding. I don't recall changing it, and I can't remember a time when I saw these sorts of encoding issues in my browser. I wonder how many other folks are using "Western" as the default encoding...
from virtual-dom.
My Chrome on macOS Sierra seems to use monospace but... they looks like Mario blocks.
from virtual-dom.
Might want to specify one of the google fonts for a typeface for drawing those, that should work around that issue regardless of platform (unless a very old IE 8 or something, in which case it would just fall back to the system fonts anyway).
from virtual-dom.
@OvermindDL1, don't want a font dependency. It'd need to be distributed with vdom to work offline.
@clarkware and @jinjor, do any of the solid triangles here show up okay on your computer?
Otherwise, it's probably best to use this trick or figure out a way to do it with SVG. The only real requirement is that it fits in a box that is 2ch
wide and no taller than the monospace font (which we will not know ahead of time)
from virtual-dom.
@evancz Yes, all of those triangles render properly regardless if I set the browser to use UTF-8 or Western encoding! So that might be the way to go...
from virtual-dom.
Hmm, I thought I was using one of them! Is there some way to know exactly what unicode character you are getting as is?
Also, how do you switch between UTF-8 and Western encoding? Do you have a link so I can see it too?
from virtual-dom.
Hmm... I'm still seeing funky characters in the beta. Strangely, changing the encoding to UTF-8 in Chrome doesn't fix it. I wonder if this is something specific to my machine. I'll continue investigating...
from virtual-dom.
Ah - fixed it! I had to set the charset in my index.html:
<meta charset="UTF-8">
Sorry for the false alarm!
from virtual-dom.
No worries. Yeah, if it's going through elm-reactor
it should work by default, but if you are doing your own thing, I'm not sure how to fix that besides having people put a meta tag like that. It may sometimes be necessary to add a charset to the actual script tag, like I had to for the reactor. Maybe there's a better solution, but I couldn't figure out how to do those tricky arrows in the right sizes.
from virtual-dom.
Related Issues (20)
- VirtualDom.lazy fires when arguments are constants
- Styles get lost after model update
- `javascript:` ban disallows legitimate use for bookmarklets HOT 4
- Html.map with IE11: Unable to get property 'j' of undefined or null reference HOT 3
- Possible to bypass XSS filter with nodeNS HOT 3
- Reusing anchor node leaves empty href attr HOT 1
- Node re-use carries over DOM state like :focus HOT 3
- Html.map + timeupdate event after DOM removal creates invalid Msg
- Uncaught TypeError: Cannot assign to read only property 'className' of object [DOM mutations from FontAwesome] HOT 1
- textarea [type_ "text"] [] blows up Elm HOT 1
- Lack of good error message when HTML document is malformed
- node removal in `_VirtualDom_diffKeyedKids` when prepending items HOT 3
- `</script>` in string literals is not escaped for embedding elm.js directly in HTML
- Redundant removal and reinsertion of node breaks focus on element HOT 6
- Preventable runtime error caused by setAttribute '' HOT 2
- Adding type_ attribute to textarea throws error in runtime
- Html.Keyed.node does not preserve scroll positions across children
- lazy can cause loss of user's input focus HOT 1
- Child elements not added to <template> elements
- Failed to execute 'removeChild' on 'Node': parameter 1 is not of type 'Node'. HOT 1
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 virtual-dom.