Page 1 of 1

distinguishing between languages

PostPosted: Sat Nov 16, 2013 6:06 pm
by rolopho
Hello,

I was wondering if Hazel can distinguish alphabetic languages from non-alphabetic ones?

I would like to sort files that start with a letter, number or symbol (like %, ', etc.) into certain folders, and files that start with a Japanese character, either from the phonetic script or from the set of Chinese characters into one folder.

At the moment, I can sort the files that start with the alphanumeric, etc. characters into folders that start with that character. The Japanese/Chinese character named files are also sorted into folders starting with their first character.

Is there there a way to sort the Japanese files into one folder? Otherwise I will end up with many folders since there are thousands of Chinese characters used in Japanese.

Thanks!

Re: distinguishing between languages

PostPosted: Sun Nov 17, 2013 1:15 pm
by a_freyer
Not by default, no.

But I think this is an interesting problem. I would suggest writing a bash script to convert the name to unicode, and determining if the letters are within the japanese unicode range (e.g., 3000+).