Skip to main content
Released

Python FME API Objects: Enhancement for Unicode Support

Related products:FME Form
  • November 2, 2015
  • 4 replies
  • 63 views

takashi
Celebrity
There are many API methods which don't accept 'unicode' instance as their string type arguments.
e.g.
1st argument (attribute name) of FMEFeature.setAttribute
1st argument (message string) of FMELogFile.logMessageString

Currently users who are working with Non-ASCII locale have to add codes to check the class of each string value and convert it to a 'string' instance if it was a 'unicode' instance, to avoid the UnicodeEncodeError.
Hope every method will accept 'unicode' instances as string type arguments.
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

david_r
Celebrity
  • November 2, 2015
I agree, this would be a nice.

 

 


david_r
Celebrity
  • November 2, 2015
Btw, I'd give you an upvote, but apparently I have -8 votes to give, so it'll have to wait till Safe fixes it ;-)

 


fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • November 3, 2015
Yes it is out intention to support unicode more completely moving forward. This is planned for FME 2017. See also https://knowledge.safe.com/content/idea/19407/update-to-python-3x.html

fmelizard
Safer
Forum|alt.badge.img+22
  • Safer
  • August 7, 2016

This is done for FME 2016.1.1 as well as FME 2017 betas.

From the "whatsnew":

 

 

FME 2016.1.1.0 16593 20160620

 

-----------------------------

 

Python: Modified logMessage() and getMessage() to allow mixed unicode and str values in the message parameters. Fixed encoding of source code passed from PythonFactory to Python interpreter. (PR#70683)