Copy link to clipboard
Copied
When you call the name of the image file in Korean in the text box, it is printed like this.
01_01%E1%84%92%E1%85%A9%E1%86%BC%E1%84%80%E1%85%B5%E1%86%AF%E1%84%83%E1%85%A9%E1%86%BC.jpg
Although I was not able to see the issue, however looking at your string it seemed to be URL encoded. You can pass this string to the following method and you shall have the correct result. See the following
decodeURI('01_01%E1%84%92%E1%85%A9%E1%86%BC%E1%84%80%E1%85%B5%E1%86%AF%E1%84%83%E1%85%A9%E1%86%BC')
-Manan
Copy link to clipboard
Copied
Can you post the code that you are using? I am not able to reproduce the issue.
-Manan
Copy link to clipboard
Copied
Thank you.
Copy link to clipboard
Copied
So this code can be modified as
if (i <= myPics.length - 1) {
myPages[p].rectangles.item("myPhoto" + n).place(File(myFolder + "/" + myPics[i].name));
myPages[p].textFrames.item("myName" + n).contents = decodeURI(myPics[i].name);
myPages[p].textFrames.item("myName" + n).contents;
i++;
-Manan
Copy link to clipboard
Copied
Thank you very much.
Copy link to clipboard
Copied
Let me ask you one more question.
Tell me how to erase the number and jpg extension from 01_01 aaa.jpg.
Copy link to clipboard
Copied
Try the following
if (i <= myPics.length - 1) {
myPages[p].rectangles.item("myPhoto" + n).place(File(myFolder + "/" + myPics[i].name));
var name = decodeURI('myPics[i].name')
var nm = name.match(/\d+_\d+(.*)\..*/)
if(nm)
myPages[p].textFrames.item("myName" + n).contents = nm[1];
-Manan
Copy link to clipboard
Copied
Thank you very much.
The blockage from studying has been lifted.
Copy link to clipboard
Copied
Thank you very much.
The blockage from studying has been lifted.
Copy link to clipboard
Copied
Thank you.
The blockage from studying has been lifted.
Copy link to clipboard
Copied
Thank you.
The blockage from studying has been lifted.
Copy link to clipboard
Copied
Although I was not able to see the issue, however looking at your string it seemed to be URL encoded. You can pass this string to the following method and you shall have the correct result. See the following
decodeURI('01_01%E1%84%92%E1%85%A9%E1%86%BC%E1%84%80%E1%85%B5%E1%86%AF%E1%84%83%E1%85%A9%E1%86%BC')
-Manan
Copy link to clipboard
Copied
Help me get this right.
01_01%E1%84%92%E1%85%A9%E1%86%BC%E1%84%80%E1%85%B5%E1%86%AF%E1%84%83%E1%85%A9%E1%86%BC.jpg
Copy link to clipboard
Copied
Merging this with the other thread you made
-Manan
Copy link to clipboard
Copied
Use decodeURI:
decodeURI ('01_01%E1%84%92%E1%85%A9%E1%86%BC%E1%84%80%E1%85%B5%E1%86%AF%E1%84%83%E1%85%A9%E1%86%BC.jpg')
returns
01_01įį
©į¼įį
µįÆįį
©į¼.jpg
Copy link to clipboard
Copied
Thank you..