Subject:
From: Ethan Dalool
Date: Tue, 3 Mar 2020 08:22:11 -0800
Hi, Ondřej. Thanks for your very fast response.

Your link says:

> This is just a cosmetic issue. Internally, megatools always work with UTF-8
file names, and even if the tool's terminal output is corrupted, files names
of downloaded/uploaded files will be correct.

But the reason I sent this email is specifically because the files are failing to upload. It's not just a cosmetic issue. Please see my error message again.

I don’t program in C++, but I know from Python experience that attempting to `open()` a filename that contains invalid characters yields the OS exception "Invalid argument". So when I see megatools displaying questionmark filenames, even when I'm using Powershell which capable of displaying UTF-8, and the "Cannot open file: Invalid Argument" exception, it makes me suspicious.

-----Original Message-----
From: Ondřej Jirman <megatools@megous.com> 
Sent: Tuesday, March 3, 2020 3:12 AM
To: Ethan Dalool <ethan@voussoir.net>
Subject: Re: 1.10.2 on Windows, megaput files with unicode names = error opening file

Hello,

On Tue, Mar 03, 2020 at 12:42:48AM -0800, Ethan Dalool wrote:
> Hi,
> 
>  
> 
> First of all, thank you for megatools. I think it's the best software 
> of its kind for interacting with mega.
> 

I'm glad megatools works for you.

> 
> I'm having some trouble using megaput to upload files with Unicode 
> characters in the filename. It gives me this error:
> 
>  
> 
> > D:\software\megatools\1.10.2\megaput.exe --config mega.ini
> "C:\outbox\ ȳ  ϼ   .zip"
> 
>  
> 
> ERROR: Upload failed for 'C:\outbox\?????.zip': Can't read local file
> C:\outbox\?????.zip: Error opening file C:\outbox\?????.zip: Invalid 
> argument
> 

https://megous.com/git/megatools/tree/README#n80

does this help?

regards,
	o.

> 
> I notice that the Unicode characters are being replaced by ? even 
> though Powershell is capable of displaying them, which leads me to 
> believe that somewhere internally, megaput is escaping the filename, 
> converting out-of- page characters to ? prior to upload, and then 
> choking on it. I know that many programs do this kind of escaping for 
> display purposes but clearly this escaped name shouldn't be going to the upload routine.
> 
>  
> 
> I hope this issue will be simple to resolve, and if I can provide 
> anything else to make it easier please let me know.
> 
>  
> 
> Thanks
>