Bug #2973: Path to FreeCAD.app can't contain unicode

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
Kunda1
Posts: 5799
Joined: Thu Jan 05, 2017 9:03 pm

Bug #2973: Path to FreeCAD.app can't contain unicode

Postby Kunda1 » Sun Nov 05, 2017 11:58 am

issue #2973: Path to FreeCAD.app can't contain unicode
Description
If the path to FreeCAD.app (MacOS application bundle for FreeCAD), or just the FreeCAD binary, contains unicode characters outside of the ASCII range then it won't launch properly. I suspect this comes from the app initialisation python script ( src/App/FreeCADInit.py ), which means that it likely occurs on other platforms than MacOS as well.
'
Steps To Reproduce
1) Make directory named uñîcøde
2) Copy FreeCAD.app in to it
3) Try to launch FreeCAD.app

Observe popup containing text like:

While initializing FreeCAD the following exception occurred: ''ascii' codec can't encode character u'\u0303' in position 23: ordinal not in range(128)'

Python is searching for its files in the following directories:
:/Users/irees/Desktop/uñîcøde/FreeCAD.app/Contents/lib/python27.zip:/Users/irees/Desktop/uñîcøde/FreeCAD.app/Contents/lib/python2.7:/Users/irees/Desktop/uñîcøde/FreeCAD.app/Contents/lib/python2.7/plat-darwin:/Users/irees/Desktop/uñîcøde/FreeCAD.app/Contents/lib/python2.7/plat-mac:/Users/irees/Desktop/uñîcøde/FreeCAD.app/Contents/lib/python2.7/plat-mac/lib-scriptpackages:/Users/irees/Desktop/uñîcøde/FreeCAD.app/Contents/lib/python2.7/lib-tk:/Users/irees/Desktop/uñîcøde/FreeCAD.app/Contents/lib/python2.7/lib-old:/Users/irees/Desktop/uñîcøde/FreeCAD.app/Contents/lib/python2.7/lib-dynload

Python version information:
2.7.13 (default, Dec 18 2016, 07:03:34)
[GCC 4.2.1 Compatible Apple LLVM 7.0.2 (clang-700.1.81)]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
chrisb
Posts: 18991
Joined: Tue Mar 17, 2015 9:14 am

Re: Bug #2973: Path to FreeCAD.app can't contain unicode

Postby chrisb » Sun Nov 05, 2017 1:52 pm

The error still exists in
OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12552 (Git)
Build type: Release
Branch: (HEAD detached at 647b6d6)
Hash: 647b6d6ea0bb03dae9f6b557fd5dd011efc1b9cd
Python version: 2.7.14
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: German/Germany (de_DE)
User avatar
Kunda1
Posts: 5799
Joined: Thu Jan 05, 2017 9:03 pm

Re: Bug #2973: Path to FreeCAD.app can't contain unicode

Postby Kunda1 » Tue Nov 21, 2017 4:09 pm

Can i designate this as a 0.17 blocker?
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
chrisb
Posts: 18991
Joined: Tue Mar 17, 2015 9:14 am

Re: Bug #2973: Path to FreeCAD.app can't contain unicode

Postby chrisb » Tue Nov 21, 2017 8:25 pm

Kunda1 wrote:
Tue Nov 21, 2017 4:09 pm
Can i designate this as a 0.17 blocker?
It's not a blocker. It is inconvenient but:
- there is a workaround (use different path)
- it doesn't destroy anything
- once running it is as good as without the bug.