Copy link to clipboard
Copied
Hello,
I was following all the video tutorials about the use of variables with a .txt or .csv file and it works well and is very usefully but why I can not use when the txt or csv file contain characters in other language that is not spanish or english? I work in Korean company and we design in both languages (english and korean) so our excel tabkles contain mostly korean characters but when are written in the txt or csv file photoshop can not recognized and just sustitude the text for strange symbols. Anybody got this problem too and know how to solve it? thanks
Copy link to clipboard
Copied
You need to set the text to unicode and use a text editor that supports unicode.
File.encoding sets the encoding for a text file. You want to use UTF-8 most likely,
Copy link to clipboard
Copied
Oh I see!@ but I am really new with excel so.... an you tell me what is "unicode"?
So basically the problem not cames from photoshop? Problem is how excel make the codification for the foreigner language? Or problem is the note bloc?
Copy link to clipboard
Copied
You would need to post on an Excel site to get Excel help.
Copy link to clipboard
Copied
Problem is not excel. I've save the file as you told me, using utf-8 bit the extension of the file is xls and photoshop only read txt and csv to work with variables
Copy link to clipboard
Copied
For me the problem was Excel, as I couldn't quickly/easily change the CSV format to use Unicode encoding.
I used LibreOffice/OpenOffice which does make this easier.
I then opened the resulting .csv file into a capable plain text editor (NotePad++) which confirmed the encoding and the characters were exported as intended.
Copy link to clipboard
Copied
You have to specify UTF-8 in BOTH Excel and Photoshop.
Copy link to clipboard
Copied
Hello!
currently I have the same problem. When I import the txt/csv file, instead of what I typed in the file, it just shows question marks.
Did you find a solution?
If you did, could you please help me?
Copy link to clipboard
Copied
Have you read the entire topic thread?
What encoding is the text file?
What encoding options are you using when importing the data-set file in Variables?
Copy link to clipboard
Copied
Hi!
I finally fixed the issue by changing the encoding and the text replacement option works great.
But now I have an issue with pixel replacement. Photoshop closes as soon as I import the csv file.
I searched for a solution and someone said I should uncheck the use of GPU. But that didn't work either.
I'd appreciate it if you could find a solution 🙂
Copy link to clipboard
Copied
Jsx can do localize, therefor you use json kind of setup and use 1 variable name which has all the languages inside. When Photoshop uses a different language than day English, when the script is called it will put the variable in that language.
Here is an example of how a cancel button and ok button will look like
};
locCancelBtn = {
en: "Cancel",
fr: "Annuler",
nl: "Annuleer",
ch: "取消"
};
locOkBtn = {
en: "OK",
fr: "OK",
nl: "OK",
ch: "好",
};
var cancelBtn = ("button");
cancelBtn.text = localize(locCancelBtn);
Are you seeing the special characters or do you get characters with weird characters aside. You could have a look at html ASCII characters. I know I some cases when using script special characters are not read properly and using html ASCII characters can fix this