View Issue Details

IDProjectCategoryView StatusLast Update
0000399FreeCADBugpublic2011-07-27 21:53
Reportergalou_breizh Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.11 
Fixed in Version0.12 
Summary0000399: cannot use macros with non-standard names
DescriptionA macro called 'tést.FCMacro' is not seen in the macro list, neither can the GUI open the file (an empty editor opens). However, from a terminal, doing "freecad tést.FCMacro" let FreeCAD execute the macro.
I guess this is because of the "é", not sure.
Additional InformationOS: Ubuntu
Version: FreeCAD 0.12, Libs: 0.12R4241 (Launchpad)
Tagsencoding, macros
FreeCAD Information

Activities

wmayer

2011-07-08 18:07

administrator   ~0000925

I can confirm this problem on Ubuntu with Qt 4.6.2. However, on Windows with Qt 4.5.3 everything works fine. Digging further into the issue it seems that Qt's QDir isn't able to locate files with non-ASCII characters. Surprisingly the file dialog shows the file but then when trying to load it QFile also fails.

wmayer

2011-07-08 18:17

administrator   ~0000926

Hm, I found the actual problem. In the main() function we set LANG and LC_ALL to C which we must do so that OpenCascade works properly. This however makes Qt failing to handle filenames with non-ASCII characters.

So, we have to find a better workaround for the OpenCascade stuff...

galou_breizh

2011-07-26 07:08

reporter   ~0000944

Hi,

a workaround would be to prevent the GUI-user to input a macro name with non-ASCII characters. Is it possible?

Gaël

wmayer

2011-07-26 11:24

administrator   ~0000946

It's possible but I don't want to have this limitation. The problem is really the OpenCascade stuff and I'll check if tmp. setting LANG=C fixes this issue.

wmayer

2011-07-27 21:53

administrator   ~0000951

Setting LANG=C fixes problems with OCC but affects Qt to use the correct encoding and thus file names are not shown.

As a workaround a UTF-8 encoding is set as the default one which seems to fix this problem.

Issue History

Date Modified Username Field Change
2011-07-06 09:39 galou_breizh New Issue
2011-07-06 09:44 galou_breizh Tag Attached: macros
2011-07-06 09:45 galou_breizh Tag Attached: encoding
2011-07-08 18:07 wmayer Note Added: 0000925
2011-07-08 18:17 wmayer Note Added: 0000926
2011-07-26 07:08 galou_breizh Note Added: 0000944
2011-07-26 11:24 wmayer Note Added: 0000946
2011-07-27 21:53 wmayer Note Added: 0000951
2011-07-27 21:53 wmayer Status new => closed
2011-07-27 21:53 wmayer Resolution open => fixed
2011-07-27 21:53 wmayer Fixed in Version => 0.12