yorikvanhavre / BIM_Workbench

A BIM Workbench for FreeCAD
363 stars 77 forks source link

Correctly display unicode strings in building outline label (building name in project setup) when using Python 2 #72

Closed pachi closed 3 years ago

pachi commented 3 years ago

Strings with accents must be passed as unicode strings to Draft.makeText so accented chars are correctly displayed in the building outline label.

yorikvanhavre commented 3 years ago

This is not python3-safe, as unicode doesn't exist anymore in python3. The correct way to handle this would be to encapsulate it in something like: if sys.version_info.major < 3:

Also JFYI, this PR contains also the commits from the 2 other PRs that you did... (It's not a big deal, as I can cherry-pick individual commits... Just more work. The best way is to create one separate branch for each change that you propose).

Thanks for the work on BIM WB anyway! Greatly appreciated!

pachi commented 3 years ago

Oh, sorry! It looks like I did create nested branches!

Thanks to you for your work on FreeCAD, it's really great! I'm just starting and trying to send small patches for what I find surprinsing.

pachi commented 3 years ago

I hope this is in a better shape now.

yorikvanhavre commented 3 years ago

Perfect, thanks for fixing!!