cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with ISO9075 and .

dooman
Champ in-the-making
Champ in-the-making
Hello.

In my application I use org.alfresco.util.ISO9075 to encode all cm:name properties.

I have the next result for that code:
ISO9075.encode("…") - > _x002e_..

I can not create node with that cm:name.
Alfresco version - 3.4.a

Is that right or this is a bug?
6 REPLIES 6

mrogers
Star Contributor
Star Contributor
Looks correct behavior to me.   That looks like an invalid name.

dooman
Champ in-the-making
Champ in-the-making
Looks correct behavior to me.   That looks like an invalid name.

Why the result is not _x002e__x002e__x002e_ ?

mikeh
Star Contributor
Star Contributor
Why the result is not _x002e__x002e__x002e_ ?
Because that's not how ISO9075 encoding works…

As far as Alfresco's default name constrains are concerned:
The characters " * \ < > ? / : | are not allowed. The name cannot end with a dot.

Mike

andy
Champ on-the-rise
Champ on-the-rise
Hi

Certain characters are allowed in XML elements at the start and others after the start.
"." only requires encoding if it is at the start - otherwise it is valid.

Andy

dooman
Champ in-the-making
Champ in-the-making
Thank you for answers!

If I correctly understand, I should encode last do in my name.

andy
Champ on-the-rise
Champ on-the-rise
Hi

You only have to encode "." if it is at the start of the name (and . is not thrown out by dictionary validation for cm:name or some UI validation)

Andy