Unicode (chinese) characters on Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Unicode (chinese) characters on Windows

Matthias Kauer
Hi,
I'm experimenting with the Windows build on your home page on my Win 7
machine.

I ran into trouble with file names that contain Chinese characters such
as minimal example 'test_sync/我报.txt'.
Running rdiff-backup yields the following error:
--------------
C:\opt\rdiff-backup-1.3.3>rdiff-backup.exe  "E:\test_sync" "E:\rdiff_target"
Found interrupted initial backup. Removing...
Exception 'Path: E:\test_sync/??.txt
Index: ('??.txt',)
Data: {'type': None}' raised of class '<type 'exceptions.AssertionError'>':
   File "rdiff_backup\Main.pyc", line 306, in error_check_Main
   File "rdiff_backup\Main.pyc", line 326, in Main
   File "rdiff_backup\Main.pyc", line 282, in take_action
   File "rdiff_backup\Main.pyc", line 336, in Backup
   File "rdiff_backup\fs_abilities.pyc", line 957, in backup_set_globals
   File "rdiff_backup\fs_abilities.pyc", line 654, in get_readonly_fsa
   File "rdiff_backup\fs_abilities.pyc", line 132, in init_readonly
   File "rdiff_backup\fs_abilities.pyc", line 354, in
set_case_sensitive_readonly
   File "rdiff_backup\fs_abilities.pyc", line 337, in test_triple

Traceback (most recent call last):
   File "rdiff-backup", line 30, in <module>
   File "rdiff_backup\Main.pyc", line 306, in error_check_Main
   File "rdiff_backup\Main.pyc", line 326, in Main
   File "rdiff_backup\Main.pyc", line 282, in take_action
   File "rdiff_backup\Main.pyc", line 336, in Backup
   File "rdiff_backup\fs_abilities.pyc", line 957, in backup_set_globals
   File "rdiff_backup\fs_abilities.pyc", line 654, in get_readonly_fsa
   File "rdiff_backup\fs_abilities.pyc", line 132, in init_readonly
   File "rdiff_backup\fs_abilities.pyc", line 354, in
set_case_sensitive_readonly
   File "rdiff_backup\fs_abilities.pyc", line 337, in test_triple
AssertionError: Path: E:\test_sync/??.txt
Index: ('??.txt',)
Data: {'type': None}
-----------

On Linux, this example works as I would expect it to. I am wondering if
this is fixable without changing my locale or if that would even help.
Since this is a Python program, I doubt it would make a difference,
would it?
In any case, it doesn't seem to depend on the console I use (cmd doesn't
display the characters, ConEmu does).

I am also wondering if there's a manual for building on Windows. The
wiki doesn't seem to be available anymore and the setup.py script that I
found in https://github.com/pgodel/rdiff-backup doesn't work for me,
probably because I don't know how to properly include librsync.

Hope you have some advice.

Best regards,
Matthias Kauer

_______________________________________________
rdiff-backup-users mailing list at [hidden email]
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Reply | Threaded
Open this post in threaded view
|

Re: Unicode (chinese) characters on Windows

Dominic Raferd-3
On 20/03/2015 04:08, Matthias Kauer wrote:

> Hi,
> I'm experimenting with the Windows build on your home page on my Win 7
> machine.
>
> I ran into trouble with file names that contain Chinese characters such
> as minimal example 'test_sync/我报.txt'.
> Running rdiff-backup yields the following error:
> --------------
> C:\opt\rdiff-backup-1.3.3>rdiff-backup.exe  "E:\test_sync" "E:\rdiff_target"
> Found interrupted initial backup. Removing...
> Exception 'Path: E:\test_sync/??.txt
> Index: ('??.txt',)
> ...
>
> On Linux, this example works as I would expect it to. I am wondering if
> this is fixable without changing my locale or if that would even help.
> Since this is a Python program, I doubt it would make a difference,
> would it?
> In any case, it doesn't seem to depend on the console I use (cmd doesn't
> display the characters, ConEmu does).
>
> I am also wondering if there's a manual for building on Windows. The
> wiki doesn't seem to be available anymore and the setup.py script that I
> found in https://github.com/pgodel/rdiff-backup doesn't work for me,
> probably because I don't know how to properly include librsync.
>
> Hope you have some advice.
>
> Best regards,
> Matthias Kauer
>
> _______________________________________________
> rdiff-backup-users mailing list at [hidden email]
> https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
> Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

If you are backing up files with unusual characters (letters) in the
filenames, it is necessary that Windows fully supports these characters
from the command line. If they can't be viewed correctly from the
command line then they can't be backed up correctly by TimeDicer. The
solution is to add the relevant language for 'non-Unicode programs'
(e.g. Chinese) under the Administrative tab in Region and Language
setting of Control Panel (for Windows 7, this is found under 'Clock,
Language, and Region').

[Quoted from http://www.timedicer.co.uk]

Dominic


_______________________________________________
rdiff-backup-users mailing list at [hidden email]
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
Reply | Threaded
Open this post in threaded view
|

Re: Unicode (chinese) characters on Windows

Matthias Kauer
Hi Dominic,
thanks for the clarification.

This is a bit tricky b/c the IME and all the other things that the
Chinese locale brings with it is quite annoying overall.
I decided to rename all the Chinese files I had to unicode using an
approach similar to the one described here:
https://geekwardnote.wordpress.com/2013/02/08/how-to-rename-chinese-file-to-pinyin/

If I had to do it again, I'd probably use
https://github.com/lxneng/xpinyin or another sync tool.

Best regards,
Matthias

On 20/03/2015 18:28, Dominic Raferd wrote:

> On 20/03/2015 04:08, Matthias Kauer wrote:
>> Hi,
>> I'm experimenting with the Windows build on your home page on my Win 7
>> machine.
>>
>> I ran into trouble with file names that contain Chinese characters such
>> as minimal example 'test_sync/我报.txt'.
>> Running rdiff-backup yields the following error:
>> --------------
>> C:\opt\rdiff-backup-1.3.3>rdiff-backup.exe  "E:\test_sync"
>> "E:\rdiff_target"
>> Found interrupted initial backup. Removing...
>> Exception 'Path: E:\test_sync/??.txt
>> Index: ('??.txt',)
>> ...
>>
>> On Linux, this example works as I would expect it to. I am wondering if
>> this is fixable without changing my locale or if that would even help.
>> Since this is a Python program, I doubt it would make a difference,
>> would it?
>> In any case, it doesn't seem to depend on the console I use (cmd doesn't
>> display the characters, ConEmu does).
>>
>> I am also wondering if there's a manual for building on Windows. The
>> wiki doesn't seem to be available anymore and the setup.py script that I
>> found in https://github.com/pgodel/rdiff-backup doesn't work for me,
>> probably because I don't know how to properly include librsync.
>>
>> Hope you have some advice.
>>
>> Best regards,
>> Matthias Kauer
>>
>> _______________________________________________
>> rdiff-backup-users mailing list at [hidden email]
>> https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
>> Wiki URL:
>> http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki
>
> If you are backing up files with unusual characters (letters) in the
> filenames, it is necessary that Windows fully supports these characters
> from the command line. If they can't be viewed correctly from the
> command line then they can't be backed up correctly by TimeDicer. The
> solution is to add the relevant language for 'non-Unicode programs'
> (e.g. Chinese) under the Administrative tab in Region and Language
> setting of Control Panel (for Windows 7, this is found under 'Clock,
> Language, and Region').
>
> [Quoted from http://www.timedicer.co.uk]
>
> Dominic
>
>
> _______________________________________________
> rdiff-backup-users mailing list at [hidden email]
> https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
> Wiki URL:
> http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki

_______________________________________________
rdiff-backup-users mailing list at [hidden email]
https://lists.nongnu.org/mailman/listinfo/rdiff-backup-users
Wiki URL: http://rdiff-backup.solutionsfirst.com.au/index.php/RdiffBackupWiki