Problems with special characters html5 bootstrap

1

I'm having problems with my html, the page does not recognize the special characters.

  <!DOCTYPE html>
    <html >
    <head>
    <title>Verde</title>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

    <link href="bootstrap-3.3.6-dist/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
    <link href="css/app.css" rel="stylesheet" type="text/css"/>

    <script src="js/jquery/jquery-1.12.3.min.js"></script>
    <script src="bootstrap-3.3.6-dist/js/bootstrap.min.js"></script>
    <script src="js/funcoes/mrsJsonUtil.js" type="text/javascript"></script>
    <script src="js/funcoes/dbtable.js" type="text/javascript"></script>
    <script src="js/funcoes/funcoes.js" type="text/javascript"></script>
    <script src="js/custom_dialogs/bootbox.min.js" type="text/javascript"></script>
    <script src="js/jsonservlet.js" type="text/javascript"></script>
    <script src="js/bd_web.js" type="text/javascript"></script>
    <script src="js/funcoes/monta_selects.js" type="text/javascript"></script>
    <script src="js/funcoes/mrsJsonUtil.js" type="text/javascript"></script>
    <script src="js/app.js" type="text/javascript"></script>

    <script src="images/webcam/jquery.webcam.js" type="text/javascript"></script>
    <!--Especifico de cada cadastro-->
    <script src="js/cadastro.js" type="text/javascript"></script>



</head>
<body> 
    <div id="divMenu"></div>
    <div class="container">        
        <div class="row">
            <div class="col-md-8">
                <div class="panel panel-primary">
                    <div class="panel-heading">Cadastro de Agente

                        </div>
                    </div> 
                    <div class="panel-body">
                        <form id="formCadastro" role="form"> 
                            <div class="row">
                                <div class="col-md-4" style="padding-left: 0px;padding-right: 0px;">
                                    <div id="divFoto"></div>
                                    <img id="imgFoto" style="width: 100%" class="img-responsive " src="images/semfoto.png" alt="semfoto"/>
                                </div>
                                <div class="form-group col-md-2">
                                    <label for="id">ID:</label>
                                    <input disabled="" type="number" class="form-control" id="inpId">
                                </div> 
                                <div class="form-group col-md-6">
                                    <label for="nome">Nome:</label>
                                    <input required="" maxlength="60" type="text" class="form-control" id="inpNome">
                                </div> 
                                <div class="form-group col-md-4">
                                    <label for="status">Status de bateria:</label>
                                    <input required   type="text"  class="form-control" id="inpStatusBateria">
                                </div> 
                                <div class="form-group col-md-4">
                                    <label for="inpTelefone">Telefone</label>
                                    <input required="" type="tel"  onkeypress="funcoes.mascara(this, '## ####-####')" maxlength="12" class="form-control" id="inpTelefone">
                                </div> 

                                <div class="form-group col-md-4">
                                    <label for="hInicio">Horario de inicio:</label>
                                    <input required="" type="datetime" class="form-control" id="inpHinicio">
                                </div> 
                                <div class="form-group col-md-4">
                                    <label for="hFim">Horario do fim:</label>
                                    <input required="" type="datetime" class="form-control" id="inpHfim">
                                </div> 
                                <div class="form-group col-md-4">
                                    <label for="inpIdGInformacao">ID Grupo Informação:</label>
                                    <select required="" class="form-control" id="inpIdGInformacao">
                                        <option value="1">info1</option>
                                        <option value="1">info2</option>
                                    </select>
                                </div> 
                                <div class="form-group col-md-4">
                                    <label for="latitude">Latitude:</label>
                                    <input disabled="" value="0"  type="text"   class="form-control" id="inpLatitude">
                                </div> 
                                <div class="form-group col-md-4">
                                    <label for="longitude">Longitude:</label>
                                    <input disabled="" value="0" type="text"  class="form-control" id="inpLongitude">
                                </div> 
                                <div class="form-group col-md-4">
                                    <label for="corMarker">Cor marker:</label>
                                    <input  type="color" class="form-control" id="inpCorMarker">
                                </div> 
                                <div class="form-group col-md-4">
                                    <label for="idExterno">ID Externo:</label>
                                    <input required type="text" class="form-control" id="inpIdExterno">
                                </div>  
                                <div class="form-group col-md-4">
                                    <label for="inpInicioRota">Início Rota</label>
                                    <input required="" type="text"  class="form-control" id="inpInicioRota">
                                </div> 

                                <div class="form-group col-md-8">
                                    <label class="checkbox-inline"><input id="inpSabado" type="checkbox" value="">Sabado</label>
                                    <label class="checkbox-inline"><input id="inpDomingo" type="checkbox" value="">Domingo</label>
                                    <label class="checkbox-inline"><input id="inpStatus" type="checkbox" value="">Status</label>
                                    <label class="checkbox-inline"><input id="inpConcentrador" type="checkbox" value="">Concentrador</label>
                                </div> 

                            </div> 

                            <div  class="pull-right">
                                <button type="submit" id="btnGravar" class="btn btn-success">Salvar</button>
                                <button type="reset" id="btnLimpar" class="btn btn-primary">Limpar</button>
                                <button type="button" id="btnExcluir" class="btn btn-danger">Excluir</button>
                            </div> 
                        </form>
                    </div>
                </div>
            </div>
            <div id="divRelacionamentos" class="col-md-4"> 

            </div>

            <div id="divModals"></div>
        </div>
    </div>

</body>

'

    
asked by anonymous 11.07.2016 / 22:13

3 answers

5

The problem will not be solved by removing the meta tags or changing accents by entities such as &ccedil; , in the latter case it is just a way to get around, but not solve.

The problem is how the files were saved, probably they were saved as ANSI (or iso-8859-1 / windows-1252), to solve the problem use programs like SublimeText or notepad ++.

Common Coding Problems

It is very common when working with accents that we encounter strange characters such as:

  • Something similar to é that represents é , this occurs because the character is unicode, but the page is in iso-8859-1 (or another compatible).
  • And the sign an example situation is when you use an iso-8859-1 compliant accents on a page that is trying to process UTF-8 due to Content-Type: ...; charset=utf8 .

How to Fix

You should save all documents like utf-8 without "BOM" , you can use software like SublimeText or notepad ++ to convert the files:

  • Using notepad ++:

  • UsingSublimeText:

  • Netbeans go Window > Preferences > General > Workspace > Text File Encoding :

      

    Source: link

  • IntelliJ IDEA go to File > Settings ( Ctrl + Alt + Shift and in the selected project make the following selections for the desired enconding (in the case the .prorperties I put as utf8 also, but it is optional):

11.07.2016 / 22:48
1

Try entities.

Example:

To write Song, you would write Can&ccedil;&atilde;o where

  • &ccedil; = ç
  • &atilde; = ã (the semicolon is part of the code)

Follow a link of a sample table

    
11.07.2016 / 22:31
-1

Friend, remove the two lines:

meta charset="utf-8"

and try again

    
11.07.2016 / 22:22