Text Encoding changing from Japanese to gibberish
I have a script I'm running that changes localized type in swatches from Japanese to Gibberish. It works ok on when run by itself, but when run within other functions it's breaking. Is there an overall encoding for files that I should be using? Or a way to convert the string back so that it reads properly?
Example White:
ホワイト
Converts to:
ホワイト
When used as key in the alert, so I'm guessing it's not finding the swatch either.
var swConvert = {
"CMYK レッド": "CMYK Red",
"CMYK イエロー": "CMYK Yellow",
"CMYK グリーン": "CMYK Green",
"CMYK シアン": "CMYK Cyan",
"CMYK ブルー": "CMYK Blue",
"CMYK マゼンタ": "CMYK Magenta",
"ホワイト、ブラック": "White, Black",
"オレンジ、イエロー": "Orange, Yellow",
"色あせた空": "Fading Sky",
"スーパーソフトブラックビネット": "Super Soft Black Vignette",
"木の葉": "Foliage",
"ポンパドール": "Pompadour",
"ホワイト": "White",
"ブラック": "Black",
"[レジストレーション]": "[Registration]"
}
for (key in swConvert) {
alert(key+" - "+swConvert[key]);
try { aD.swatches[key].name = swConvert[key]; } catch (e) {};
}
