Re: [greenstone-devel] utf collection folder names strange behaviour

From Michael Dewsnip
DateThu, 23 Jun 2005 14:24:11 +1200
Subject Re: [greenstone-devel] utf collection folder names strange behaviour
In-Reply-To (1118997582-42b28c4e138db-my-ceid-upatras-gr)
Hi,

This turns out to be quite complicated. I think since you're using a
Greek Windows XP your Greek filenames will actually be in Windows-1253
encoding, rather than UTF-8. This is the reason why I wasn't getting the
same result as you -- because I was creating the filenames in UTF-8.

It seems that Perl's link function doesn't work with non-UTF-8
filenames, at least with Perl 5.6, and this is causing the error message
you see. But, ImageMagick (version 5.5.7) doesn't seem to work with
UTF-8 filenames, so you're even worse off in this case.

The "util::hard_link: unable to create hard link" message is only a
warning (a normal copy will be done if the "link" fails), so you can
ignore it. If the messages annoy you then you can remove them from the
hard_link function in util.pm, or make them only display if $verbosity > 2.

All the best,

Michael

papadimi@ceid.upatras.gr wrote:

>Dear Michael, i use version 2.6 with winXP. I downloaded the new util.pm, and i
>stopped getting the message:
>
>"WARNING: No plugin could recognise myfile.item"
>
>but i still get the other messages. In fact i don't worry much about the wrong
>print of ��� chars instead of the greek, but for the
>message:
>
>"import.pl> util::hard_link: unable to create hard link. Attempting to copy
>file:
>C:Greenstonecollectglinogreekimport�����
>�����scan15453.jpg ->
>C:GreenstonecollectglinogreekarchivesHASH018f.dirscan15453.jpg".
>
>I am attaching a simple folder of the import dir of my collection and the
>collect.cfg file (i use collection specific macros so you won't be able to
>browse).
>
>Best Regards
>
>□□□□□□ □□□□□□ □□□ Michael Dewsnip <mdewsnip@cs.waikato.ac.nz>:
>
>
>
>>Hi,
>>
>>Although there is no theoretical reason why Greenstone shouldn't work
>>with Unicode filenames, in practice this hasn't had much testing and I
>>imagine there will be a few bugs (I've just fixed one in util.pm).
>>
>>The Perl that is used to run the Greenstone scripts must also be told to
>>use Unicode -- with Perl 5.6 and 5.8.0 this means adding the "-C" flag, eg:
>>
>> perl -S -C import.pl mycolname
>>
>>I'm not sure about newer versions of Perl.
>>
>>I've been unable to reproduce your problem, however. Could you please
>>provide a very small collection that shows this problem when built?
>>(Which version of Greenstone are you using?)
>>
>>Regards,
>>
>>Michael
>>
>>
>>
>>
>>
>>>I get a strange behaviour when i use greek names for the subfolders of my
>>>collection. The collection uses PagedImagePlug. For examle, i have
>>>mycolname/□□□□□□□□□□1 etc ... When the collection is built it prints:
>>>"import.pl> util::hard_link: unable to create hard link. Attempting to copy
>>>
>>>
>>>file:
>>>
>>>
>C:Greenstonecollectmycolnameimport&#65533;&#65533;&#65533;1&#65533;&#65533;
>&#65533;&#65533;&#65533;&#65533;&#65533;scan15453.jpg
>
>
>>->
>>
>>
>>>C:GreenstonecollectmycolnamearchivesHASH018f.dirscan15453.jpg" and
>>>
>>>"WARNING: No plugin could recognise myfile.item". The collection works fine
>>>
>>>
>>>then (successful built) but why does it happen when i use the greek
>>>
>>>
>>characters
>>
>>
>>>(with english chars it doesn't attempt to copy).
>>>
>>>Thanks for any info.
>>>
>>>
>>>
>>>
>>
>>
>
>
>
>
>----------------------------------------------------
>This mail was sent through http://my.ceid.upatras.gr
>
>
>