Paint unable to read some japanese file name

Hi Everyone,

I have a problem which paint application sometimes cannot open file name with Japanese characters.

The situation is,

  1. read image file(JPEG) in a folder path which contains some character.
  2. open the image and copy it.
  3. paste the image inside Excel.

What I have done,

  1. Using excel application and open the excel file
  2. Using for each loop and get the image file
  3. Open paint with the image file name
  4. Copy the image and close paint
  5. Paste it into excel and close excel

Result,

  1. In my case, I have 2 images that to be processed and both image name have japanese characters.
  2. I have managed to process one of the image but unable to process another one.

Problem,

  1. I get message from Paint mentioned that the file path is not exist.
  2. The filename in the error message is not same with the filename in the folder(the Japanese character is missing).

What I have done so far,

  1. If I remove the Japanese characters, then it would run perfectly. However this is not the solution I want because I need to remain the Japanese character.
  2. I have used write line, and the output for the file name is correct. So there is no problem with output from Uipath.

Anyone can help me with the issue or any other solution that can help me on this.

Hi @hairulazizan
Are you facing the same issue with first file too through which you are iterating?

Also check for traling spaces in the filename and filename u provided as through uipath

Regards
Nived N
Happy Automation

Hi @hairulazizan,

The scenario is insert the image in excel sheet. So why don’t you use macro to insert the image instead of opening in paint and copy paste the image?

Hi @aanandsanraj . Thank you for your suggestion. Actually I am doing maintenance for my client and try to fix their code. Since some of the file still can be processed, if possible I would like to stay with their code and try to find a solution on how Paint can read the Japanese characters.

Hi @NIVED_NAMBIAR,

Thank you for your reply.
The first file is working fine. Robot can open the image with paint, copy it and paste into excel.

However, the second one, paint show error that the file doesn’t exist.

Sorry I am new to uipath so may I know how to check for trailing spaces?

U can try with stringvariable.Trim

@NIVED_NAMBIAR thank you for your solution. I found that the filename has space in it. Thanks again

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.