View Issue Details

IDProjectCategoryView StatusLast Update
0001947FreeCADBugpublic2017-12-07 09:44
Reporterwandererfan Assigned Towandererfan  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.15 
Fixed in Version0.17 
Summary0001947: Non-ASCII Character in ShapeString FontFile Path
DescriptionShapeString does not handle file paths containing non-ASCII characters.

Forum: http://forum.freecadweb.org/viewtopic.php?f=3&t=9481&start=50
Tagsshapestring, unicode
FreeCAD Information

Relationships

related to 0003139 closedyorik Draft Draft ShapeString tool doesn't have utf-8 support 

Activities

shoogen

2015-02-04 11:41

developer   ~0005764

please look in http://www.forum.freecadweb.org/viewtopic.php?f=17&t=9568&p=77607#p77607 , as well

Kunda1

2017-03-28 19:18

administrator   ~0008725

Wandererfan, what would be required to fix this? Does shoogen's patch have any implication on it ?

wandererfan

2017-03-30 14:12

manager   ~0008738

The links to shoogen's patch are all dead, so I don't know.
From a quick look, I think the fix goes in DraftTool.py around line 2097.
        dquote = '"'
        if type(self.SString) == unicode: # Python3: no more unicode
            String  = 'u' + dquote + self.SString.encode('unicode_escape') + dquote
        else:
            String  = dquote + self.SString + dquote
        Size = str(self.SSSize)                              # numbers are ascii so this should always work
        Tracking = str(self.SSTrack)                         # numbers are ascii so this should always work
        FFile = dquote + self.FFile + dquote

FFile should have "if (type(self.FFile) == unicode" block like SString.

Kunda1

2017-10-09 14:26

administrator   ~0010269

@wmayer can you weigh in on this at your convenience?

Kunda1

2017-12-07 04:15

administrator   ~0010527

FreeCAD Pull Request 1149

wmayer

2017-12-07 09:44

administrator   ~0010535

https://github.com/FreeCAD/FreeCAD/commit/750661de3503e5cca3a1d7ae5614340d4948d9df

Issue History

Date Modified Username Field Change
2015-02-03 12:52 wandererfan New Issue
2015-02-03 12:52 wandererfan Status new => assigned
2015-02-03 12:52 wandererfan Assigned To => wandererfan
2015-02-04 11:41 shoogen Note Added: 0005764
2017-01-19 17:06 Kunda1 Tag Attached: shapestring
2017-03-28 18:59 Kunda1 Tag Attached: unicode
2017-03-28 19:18 Kunda1 Note Added: 0008725
2017-03-30 14:12 wandererfan Note Added: 0008738
2017-09-30 11:41 Kunda1 Relationship added related to 0003139
2017-10-09 14:26 Kunda1 Note Added: 0010269
2017-12-07 04:15 Kunda1 Note Added: 0010527
2017-12-07 09:44 wmayer Status assigned => closed
2017-12-07 09:44 wmayer Resolution open => fixed
2017-12-07 09:44 wmayer Fixed in Version => 0.17
2017-12-07 09:44 wmayer Note Added: 0010535