APK errors

In JSON the letter ə becomes \u0259

This is not corruption. By default json.dumps writes the letter ə as \u0259. That is the code of the same letter. When a program reads the file, it gets ə again.

If you want to see the letter in the file, write ensure_ascii=False and save the file as utf-8. Do not write cp1254. That table has no ə.

Do not change everything at once.

  • \u0259 in the file is ə for a program. Do not delete it by hand.
  • If you want to see the letter: json.dumps(melumat, ensure_ascii=False).
  • When you write the file, set encoding="utf-8". Without encoding, Windows may take the Turkish table and drop ə.
  • utf-8-sig is for an Excel CSV. JSON does not use sig.
  • ensure_ascii=True is not a mistake. For the network and an old tool, \u0259 stays safe.

\u0259 is not a broken ə. It is another way to write the same letter.

import json

metn = json.dumps({"olke": "Azərbaycan"}, ensure_ascii=False)
with open("metn.json", "w", encoding="utf-8") as fayl:
    fayl.write(metn)

Related guides