Skip to main content
Question

How to define user parameters font encoding?


tb09114
Supporter
Forum|alt.badge.img+24

 

I want to define the location of my log file, and tried to set the path together in a File/Url type user parameter. One part of the name can contain letters e.g. ø, å, æ etc and I can see in the translation log they are returned as utf8 codecs (e.g. _00f8_).

In earlier versions of FME Desktop was there the possibility to specifiy the character encoding, but it seems like somebody forgot to implement this in 2021.

The definition of the path should be as such: 

C:Temp\$(WORKSPACE_NAME)_$(b_number)_$(municipality)_$(year).log

, where 'municipality' can contain special characters.

 

The other thing is of course, that as soon as $(WORKSPACE_NAME) is in the picture i am getting 'Undefined macro `WORKSPACE_NAME' dereferenced in file'.

 

Last problem the log file does of course not exist at the point when I start the workspace. Do I have to create the logfile manually i a startup script?

2 replies

david_r
Celebrity
  • July 14, 2021

In theory, all parts of FME 2021 should now be Unicode enabled, which means that you should not run into any encoding problems at this level, which I guess is why Safe removed the encoding option.

So this means that parameter values should be set using UTF-8 character encoding. Are you perhaps using a different encoding? Can you perhaps post a minimal workspace here that demonstrates the issue, e.g. by sending the output to a Logger?


tb09114
Supporter
Forum|alt.badge.img+24
  • Author
  • Supporter
  • July 15, 2021

Well, since I am on a Windows machine I assume the font encoding goes by 'System' in earlier versions of FME, referring to windows-1252 (Cp1252).

 

I added a workspace here, where the navigator is already showing the encoding issue.

log_path_issue


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings