elm-lang / elm-make

A build tool for Elm projects
BSD 3-Clause "New" or "Revised" License
175 stars 45 forks source link

`--debug` expand contract arrows appear as: 'â–¾' when html header doesn't include meta 'charset="UTF-8"' #131

Closed NickAger closed 7 years ago

NickAger commented 7 years ago

Tested in 0.18 on Safari 10.0.1 and Chrome 54.0.2840.98

module Main exposing (..)

import Html exposing (beginnerProgram, div, button, text)
import Html.Events exposing (onClick)

main =
    beginnerProgram { model = { value = 0 }, view = view, update = update }

type alias Model =
    { value : Int
    }

view model =
    div []
        [ button [ onClick Decrement ] [ text "-" ]
        , div [] [ text (toString model.value) ]
        , button [ onClick Increment ] [ text "+" ]
        ]

type Msg
    = Increment
    | Decrement

update msg model =
    case msg of
        Increment ->
            Model (model.value + 1)

        Decrement ->
            Model (model.value - 1)

rather than:

▾{
value = 0
}

adding the meta tag to the html <head>:

<meta charset="UTF-8">

causes the correct expand/contract arrows to be show.

process-bot commented 7 years ago

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.

evancz commented 7 years ago

Duplicate of https://github.com/elm-lang/virtual-dom/issues/52