I have been following this answer on how enable Python (2.7) to correctly receive file names from the Windows command line that have names such as 'canção.pdf', '조선.pdf' or 'मान.pdf'.
My bat file (which is in shell:sendto) is as follows (as advised here):
@echo off
@chcp 65001 > nul
@set PYTHONIOENCODING=utf-8
python "D:\Dropbox\Python\print_file_name.py" %1
pause
My python script at moment just tries to prints these file names:
sys.argv = win32_unicode_argv()
file_name = sys.argv[1].encode(sys.stdout.encoding)
print file_name
win32_unicode_argv() is a method described here.
Even thou I am able to print 'canção.pdf' correctly, I'm still not able to print either '조선.pdf' or 'मान.pdf'. Any advice on how to tackle this issue?