Swedish letter not shown correct for editor

Swedish letter not shown correct for editor

NilsJNilsJ Posts: 8Questions: 4Answers: 0

I have an editor where I set the language options with an url (file) like
'language': { 'url': '/js/language/datatables_swe.json' }
the json file contains the same strings that work when I set them in the javascript file

{
  
    "sEmptyTable": "Tabellen innehåller inget data",
    "sInfo": "Visar _START_ till _END_ av totalt _TOTAL_ rader",
    "sInfoEmpty": "Visar 0 till 0 av totalt 0 rader",
    "sInfoFiltered": "(filtrerade från totalt _MAX_ rader)",
    "sInfoPostFix": "",
    "sInfoThousands": " ",
    "sLengthMenu": "Visa _MENU_ rader",
    "sLoadingRecords": "Laddar...",
    "sProcessing": "Bearbetar...",
    "sSearch": "Sök:",
    "sZeroRecords": "Hittade inga matchande resultat",
  "oPaginate": {
    "sFirst": "Första",
    "sLast": "Sista",
    "sNext": "Nästa",
    "sPrevious": "Föregående"
  }
}

But when I set them that way the swedish letters å, ä and ö are shown as a questionmark (?).
Any suggestions how I can fix that ?

Answers

  • allanallan Posts: 48,464Questions: 1Answers: 7,020 Site admin

    Sounds like a character encoding issue. Is the HTML file UTF8? How about the character set that the server is sending the file as? They all need to be consistent for it to work unfortunately.

    Allan

  • NilsJNilsJ Posts: 8Questions: 4Answers: 0

    My Project is an SPA (single page application) with following header

    <head>
        <meta charset="utf-8">
        <title>Kvävebilsschema</title>
        <base href="/">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="icon" type="image/x-icon" href="favicon.ico">
        <link href="css/vendor.min.css?v=1543490344404" rel="stylesheet" />
        <link href="css/styles.css?v=1543490344404" rel="stylesheet" />
       
    
    
    </head>
    
Sign In or Register to comment.