{"action":"created","issue":{"url":"https://api.github.com/repos/Backblaze/B2_Command_Line_Tool/issues/215","repository_url":"https://api.github.com/repos/Backblaze/B2_Command_Line_Tool","labels_url":"https://api.github.com/repos/Backblaze/B2_Command_Line_Tool/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/Backblaze/B2_Command_Line_Tool/issues/215/comments","events_url":"https://api.github.com/repos/Backblaze/B2_Command_Line_Tool/issues/215/events","html_url":"https://github.com/Backblaze/B2_Command_Line_Tool/issues/215","id":172250380,"number":215,"title":"\"surrogates not allowed\" error when using b2 to sync files with accented characters","user":{"login":"fortinmike","id":118257,"avatar_url":"https://avatars.githubusercontent.com/u/118257?v=3","gravatar_id":"","url":"https://api.github.com/users/fortinmike","html_url":"https://github.com/fortinmike","followers_url":"https://api.github.com/users/fortinmike/followers","following_url":"https://api.github.com/users/fortinmike/following{/other_user}","gists_url":"https://api.github.com/users/fortinmike/gists{/gist_id}","starred_url":"https://api.github.com/users/fortinmike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fortinmike/subscriptions","organizations_url":"https://api.github.com/users/fortinmike/orgs","repos_url":"https://api.github.com/users/fortinmike/repos","events_url":"https://api.github.com/users/fortinmike/events{/privacy}","received_events_url":"https://api.github.com/users/fortinmike/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-08-20T03:13:28Z","updated_at":"2016-08-21T19:23:08Z","closed_at":null,"body":"I'm trying to sync files with `b2 sync` from a Synology NAS but all files whose name contains accented characters (such as é, è, à) fail to sync with an error such as this:\r\n\r\n`'utf-8' codec can't encode character '\\udcc3' in position 14: surrogates not allowed`\r\n\r\n**Full error message:**\r\n\r\n    b2_upload(/volume1/Backup/Files/@eaDir/Cégep@SynoResource, Files/@eaDir/Cégep@SynoResource, 1464922452765): UnicodeEncodeError('utf-8', 'Files/@eaDir/C\\udcc3\\udca9gep@SynoResource', 14, 15, 'surrogates not allowed') 'utf-8' codec can't encode character '\\udcc3' in position 14: surrogates not allowed\r\n\r\nI tried fiddling with Python encoding environment variables but I've had no luck making this work. I'm starting to realize this might be something that could only be handled in the b2 tool itself.\r\n\r\nAm I right, or is there something I can do to make this work on my machine?"},"comment":{"url":"https://api.github.com/repos/Backblaze/B2_Command_Line_Tool/issues/comments/241276260","html_url":"https://github.com/Backblaze/B2_Command_Line_Tool/issues/215#issuecomment-241276260","issue_url":"https://api.github.com/repos/Backblaze/B2_Command_Line_Tool/issues/215","id":241276260,"user":{"login":"fortinmike","id":118257,"avatar_url":"https://avatars.githubusercontent.com/u/118257?v=3","gravatar_id":"","url":"https://api.github.com/users/fortinmike","html_url":"https://github.com/fortinmike","followers_url":"https://api.github.com/users/fortinmike/followers","following_url":"https://api.github.com/users/fortinmike/following{/other_user}","gists_url":"https://api.github.com/users/fortinmike/gists{/gist_id}","starred_url":"https://api.github.com/users/fortinmike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fortinmike/subscriptions","organizations_url":"https://api.github.com/users/fortinmike/orgs","repos_url":"https://api.github.com/users/fortinmike/repos","events_url":"https://api.github.com/users/fortinmike/events{/privacy}","received_events_url":"https://api.github.com/users/fortinmike/received_events","type":"User","site_admin":false},"created_at":"2016-08-21T19:23:08Z","updated_at":"2016-08-21T19:23:08Z","body":"@ppolewicz There is no stack trace printed, just tons of one-line errors like this:\r\n\r\n    b2_upload(/volume1/Backup/Files/@eaDir/Cégep@SynoResource, Files/@eaDir/Cégep@SynoResource, 1464922452765): UnicodeEncodeError('utf-8', 'Files/@eaDir/C\\udcc3\\udca9gep@SynoResource', 14, 15, 'surrogates not allowed') 'utf-8' codec can't encode character '\\udcc3' in position 14: surrogates not allowed\r\n\r\n`ls` displays the file names properly when I ssh to my NAS.\r\n\r\n`export LC_ALL=en_US.utf16` results in the following error: `setlocale: LC_ALL: cannot change locale`\r\n\r\nI also tried `LC_ALL=C LANG=en_US.utf16` which didn't result in this error but I got other path errors (`file names must not contain '\\'`, etc.), so I didn't venture further. I'm not familiar with LC_ALL and locale configuration on Linux."}}
{"actor":{"display_login":"fortinmike"}}