[BUG] [OBJ Exporting] Non-alphanumeric characters in Object Name are converted to underbar character when exported as OBJ


According to here, “Layer names and object names export into the OBJ file as OBJ group names. Spaces in the layer or object names are converted into underbar (_) characters”.

My objects contain some Non-alphanumeric characters in their name. When I’d tried to export them,
I found out that non-alphanumeric characters are also converted to underbar (_) too.

I have tested it on Rhino for Windows and Rhino for Mac. Both same.

Is there any known workaround for this?

Rhino for Mac : 5.3.2
Rhino for Windows: Version 5 SR13 32-bit

Thank you.

@tim Do you know of any workarounds for this by any chance?

Spaces are separators in OBJ so having spaces in any name (group, layer, object, material) is a bad idea. OBJ is also supposed to be ascii only as far as I know. What sort of characters are you talking about?

I couldn’t find an explicit mention of ASCII. The spec only says that a name can be composed of a combination of letters and numbers.

I would create a name where whitespace and punctuation is replaced with underscore, but keep (UTF8) letters. I tested the Blender OBJ exporter and importer, those work fine with non-ASCII letters.

This is what we use for the OBJ file format. https://www.cs.utah.edu/~boulos/cs3505/obj_spec.pdf Actually, it’s that text printed as a hard copy in a binder. Here’s another version of it. http://paulbourke.net/dataformats/obj/ I’m not objecting necessarily, but Blender is not the only downstream app that will read obj files.

Say if I assigned “1|2@3#4$5%6^” as the name of an object, it would be exported as “1_2_3_4_5_6_”.

Yes, I’ve read those several times (select bits :wink: ). But only now I realize that ASCII is actually specified, I was just not looking in the right place. I was looking for a specific passage using the actual words character set. But it is of course already mentioned that OBJ is either ASCII format or binary. I am just so accustomed to take ASCII just meaning text in general…

Yes. The specification says combination of letters and numbers