Im Trying to build a JSON File (For Adobe After Effects CC 2018 v15.0.1) from inputs entry and it worked perfectly except the encoding part for arabic language.
My Script :
Bullet1 = Input.GetText("Input1");
Bullet2 = Input.GetText("Input2");
Bullet3 = Input.GetText("Input3");
Bullet4 = Input.GetText("Input4");
JSON = "\[\n\t{\n\t\t"Bullet1": "".. Bullet1 .. ""," .. "\n\t\t"Bullet2": "".. Bullet2 .. ""," .. "\n\t\t"Bullet3": "".. Bullet3 .. ""," .. "\n\t\t"Bullet4": "".. Bullet4 .. ""\n\t},\n\t{\n\t\t"Bu1let1": ""\n\t}\n\]";
TextFile.WriteFromString("D:\\MyFile.txt", JSON, false);
--Encoding.ConvertFile("D:\\MyFile.txt", "iso-8859-1", "D:\\MyFile.txt", "utf-8"); \\ I tried this encoding script but it didnt work.
--Encoding.WriteFromString("D:\\MyFile.txt", JSON, "utf-8", "iso-8859-1"); \\ Also tried this encoding script but it didnt work.
File.Rename("D:\\MyFile.txt", "D:\\arabic.json");
note that i used all encoding formats but it didnt work
if you open the JSON file in text editor it will appear normal and arabic is working, but it will not work in after effects unless its UTF-8 for arabic.
The file is working in english but not in arabic if its not UTF-8 (for Adobe After effects CC2018 15.0.1)
Hope someone can help especially Ulrich
My Script :
Bullet1 = Input.GetText("Input1");
Bullet2 = Input.GetText("Input2");
Bullet3 = Input.GetText("Input3");
Bullet4 = Input.GetText("Input4");
JSON = "\[\n\t{\n\t\t"Bullet1": "".. Bullet1 .. ""," .. "\n\t\t"Bullet2": "".. Bullet2 .. ""," .. "\n\t\t"Bullet3": "".. Bullet3 .. ""," .. "\n\t\t"Bullet4": "".. Bullet4 .. ""\n\t},\n\t{\n\t\t"Bu1let1": ""\n\t}\n\]";
TextFile.WriteFromString("D:\\MyFile.txt", JSON, false);
--Encoding.ConvertFile("D:\\MyFile.txt", "iso-8859-1", "D:\\MyFile.txt", "utf-8"); \\ I tried this encoding script but it didnt work.
--Encoding.WriteFromString("D:\\MyFile.txt", JSON, "utf-8", "iso-8859-1"); \\ Also tried this encoding script but it didnt work.
File.Rename("D:\\MyFile.txt", "D:\\arabic.json");
note that i used all encoding formats but it didnt work
if you open the JSON file in text editor it will appear normal and arabic is working, but it will not work in after effects unless its UTF-8 for arabic.
The file is working in english but not in arabic if its not UTF-8 (for Adobe After effects CC2018 15.0.1)
Hope someone can help especially Ulrich
Comment