GithubHelp home page GithubHelp logo

Comments (15)

gregor-tusar avatar gregor-tusar commented on May 21, 2024 2

This happend to me when I created a file in Visual Studio. The translations on page had � inside.
I opened the same file with Visual Studio Code, I saw the � chars there also. I replaced the texts and saved a file which solved my issue. It seems that the Visual Studio is messing with encoding.
image
Top: VisualStudio Community Bottom: VisualStudio Code

from i18next.

jamuhl avatar jamuhl commented on May 21, 2024 1

as i use a lot of german special chars (ä, ö + ü,...) not sure where the problem is.

  • try <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> in the header of the html
  • assert resource file comes with utf-8 encoded

from i18next.

AlexandroMtzG avatar AlexandroMtzG commented on May 21, 2024 1

@jamuhl 3,967 days later, but I love you

from i18next.

fredericrous avatar fredericrous commented on May 21, 2024

I started to develop using i18next few weeks ago. For now I just have fr/en translations and I've got no problems with accents.
As jamuhl said, try to change your header meta tag. I use pretty much the same he gave you : <meta charset="UTF-8">

from i18next.

Jeelig avatar Jeelig commented on May 21, 2024

Thank you for your responses, I've tried what jamuhl said, but I did'nt managed to do it.
Here is my page :
http://m0si.com/lang/index.html?setLng=fr-FR
I can send you the sources if you need to see but I still have problem with accents

from i18next.

jamuhl avatar jamuhl commented on May 21, 2024

What do you use on serverside to serve the json files? For me it seems like there's the problem as their content already has the unknown char �.

from i18next.

Jeelig avatar Jeelig commented on May 21, 2024

Here is the content of the json file (ns.special.json) :
{
"app": {
"title": "Le titré",
"content": "Voici chère frère mon contenu...",
"footer": "Pied de page"
}
}

from i18next.

Jeelig avatar Jeelig commented on May 21, 2024

in the "locales/fr-FR" folder

from i18next.

jamuhl avatar jamuhl commented on May 21, 2024

i meant...your server is serving the json files in wrong encoding. Might be configuration issue in apache or whatever you use as webserver.

from i18next.

Jeelig avatar Jeelig commented on May 21, 2024

how can I change it, and where? please

from i18next.

jamuhl avatar jamuhl commented on May 21, 2024

if your using apache this might help you:
http://stackoverflow.com/questions/913869/how-to-change-the-default-encoding-to-utf-8-for-server

from i18next.

jamuhl avatar jamuhl commented on May 21, 2024

closing this...you might try to find answer at stackoverflow

from i18next.

boycce avatar boycce commented on May 21, 2024

In regards to this, if you are using a text editor make sure you set the encoding also to UTF-8. This was my problem 🌎

from i18next.

jamuhl avatar jamuhl commented on May 21, 2024

@toxinhead good catch...i always forget there are editors that save in non utf-8 formats by default. how fast one forgets. thanks a lot for pointing to this solution.

from i18next.

PhaedrusTheGreek avatar PhaedrusTheGreek commented on May 21, 2024

I had the same problem, with the same solution. . I copied and pasted the text from translation.json into another file and resaved it, and it was fine. Originally I edited the file in eclipse, but i switched to notepad++

from i18next.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.