Cancel
Showing results for 
Search instead for 
Did you mean: 

Allowed characters for name / unit / comment

Experimenter
Experimenter

Which characters are allowed for name/unit/comment entries of variables? I am using the MindConnectLib in our program, and had to find out that the "°" used in units for temperatures or angles causes the variable creation to fail with a rather unhelpful error. It seems there are some more "forbidden" characters, but I could find no hint about them in the documentation.

So it would be nice to document somewhere which characters are allowed, or which are not.

7 REPLIES 7

Re: Allowed characters for name / unit / comment

Genius
Genius

@ABock Can you post a full example of name/unit/comment what you tried to use?

I just created a variable in Asset Manager and "°" is a valid unit there.

What does the error exactly says?

Re: Allowed characters for name / unit / comment

Experimenter
Experimenter

When I try to create the asset signals, and one of the signals has the unit field set to "°" or "°C", regardless of the other fields, the final call to mcl_communication_exchange() returns with "400: BAD REQUEST". As I said, not a very helpful response.

Re: Allowed characters for name / unit / comment

Valued Contributor
Valued Contributor

@ABock, degree sign is represented as "0xC2 0xB0 (c2b0)" in UTF-8 (hex), so you should give it as "°" or "°C" for your development environment.

Re: Allowed characters for name / unit / comment

Experimenter
Experimenter

@yguven   Thanks for the hint. So I added to my app a UTF8 converter, and it works with all the characters that caused the interface to malfunction.

 

I rechecked the documentation of the MindConnectLib, and couldn't find any hint to use UTF8. Maybe that should be added somewhere so others can find it, too.

Re: Allowed characters for name / unit / comment

Valued Contributor
Valued Contributor

@ABock, please follow the online documentation for latest updates:

https://developer.mindsphere.io/resources/mindconnect-lib/resources-mclib-overview.html

Re: Allowed characters for name / unit / comment

Experimenter
Experimenter

I did. Nothing mentioning character sets there.

Re: Allowed characters for name / unit / comment

Valued Contributor
Valued Contributor

Yes, you're right.

We are going to add a note to this online doc. soon.