Non-standard unicode chars and execution from shell



  • Hello!
    Is it possible to run scripts with robofont -p $path command with path, containing non-standard unicode characters?
    Doesn't work for me. Also i've tried to add this path to sys.path on starting up, but this only allow to import from it with robofont -c "import ..", but it's not exactly what I need.


  • admin

    hello @Max-Ilinov,

    not sure what you mean by “non-standard unicode characters” – can you give an example? (I’ve just tested with a simple print('привет мир') script, works fine)

    to add a module to RoboFont during start up, there are two options:

    1. add it to sys.path using a start up script
    2. copy the library into the external_packages folder

    hope this helps!



  • Hello, @gferreira, and thank you!
    I'm trying to run script in robofont with shell command. But my working path contains a character , double monocular o.
    Shell command in this case looks like this:

    robofont -p ~/Documents/Work/ꙭ/project/scripts/allratioslookup.py
    

    It's working when I put the script outside the folder , so I think it's the reason.

    It's a quite big project with many scripts written for and also with direct links in those scripts across all the folders in this project, so it can be difficult to change the path for now. (I think it might be a simplest solution)

    If it's not possible, it is ok, I'm just doing some optimisation, so it might be helpfull, but not necessary.


  • admin

    hi @Max-Ilinov,

    thanks for the clarification – so it’s about unicode characters in the file name passed as argument to the RoboFont shell.

    I’ve found a way to make it work, at least on my machine.

    please give this a try:

    1. find the the RoboFont shell script in usr/local/bin/roboFont (alias), open it in a code editor

    2. look for options[argKey].append(arg) (line 47) – change arg to arg.decode('utf-8')

    3. save the changes to the shell script, restart the Terminal, and try again

    good luck!



  • Gustavo, thank you a lot!
    It works!