Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Program not working for paths with cyrillic letter #5

Closed
shnaps opened this issue Apr 9, 2018 · 6 comments
Closed

Program not working for paths with cyrillic letter #5

shnaps opened this issue Apr 9, 2018 · 6 comments

Comments

@shnaps
Copy link

shnaps commented Apr 9, 2018

SubSync doesn't work when it has cyrillic letter in a path. I tried couple paths, same error everytime

@BlackDragonBE
Copy link

@zerratar
This can be fixed by using UTF-8 encoding when manipulating strings and streams. This way, Arabic and Greek characters are also be supported on top of Latin and Cyrillic.
Some examples: https://www.arclab.com/en/kb/csharp/read-write-text-file-ansi-utf8-unicode.html

@zerratar
Copy link
Owner

zerratar commented Apr 9, 2018

@BlackDragonBE Unfortunately the problem is not reading/writing files but the actual filepath that is passed by the args parameter when starting SubSync that for some reason is not unicode when @shnaps tried to use it. So the filesystemwatcher crashes when it gets folder path containing questionmarks.

Latest version atleast support displaying unicode In the console so the cyrillic chars does display correctly.

@shnaps: can you try and run SubSync from the same folder you want to watch and without passing any input folder as parameter? That should force it to run in current directory.

If it works then we know that it can handle cyrillic paths and that the input was not passed as unicode from the console because the videofile you had contains cyrillic chars in it.

@shnaps
Copy link
Author

shnaps commented Apr 9, 2018

@zerratar
Yep, it works.

@zerratar
Copy link
Owner

zerratar commented Apr 10, 2018

@shnaps
Awesome that it works for you!

Less awesome part is that it confirms my theory that the program used for inputting the directory that is not passing the values as Unicode. And I can't do anything about that since the problem does not lie with SubSync.

However! There are other ways to go around it. If you create a shortcut to SubSync.exe and pass the folder you want to sync in along with the target and it will work.

See screenshot here

@zerratar
Copy link
Owner

I will close this issue now, please make a new one if you find any new problems and thank you for reporting this!

@BlackDragonBE even though that was not the solution to this problem, I really appreciate that you wanted to help out. So I hope that my comment was not too harsh/or if you took it the w rong way! If so, I'm very sorry!

@BlackDragonBE
Copy link

@zerratar No offense taken! This an interesting problem and gave me food for thought for my own projects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants