This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I just noticed that XMLMapAttr when reading/writing .nbattrs files (and presumably also layers?) uses Java-style \uXXXX Unicode escapes for non-ASCII characters (or something). Is this really right (and if so is it documented)? Shouldn't it be using XML character entities, since it is reading/writing XML? Anyway it sets the file encoding to UTF-8 so I assume international characters (e.g. in <attr stringvalue="..."/>) are safe there; for '<' etc. it should use "<" IMHO, not the \uXXXX escape. As far as control characters go, if these cannot be represented even with numeric character entities, I would suggest using serialdata="..." in values, and throwing an IOException in keys (which ought not be random garbage anyway).
I think such escaping must be used for control characters and it is correct if user's "\uXXX" text is properly escaped. For any other characters it is just extra work. UTF-8 encoded XML document will handle all other characters transparently.
What is the exact rule for purposes of documentation? AFAIK this convention is undocumented. What if \uXXXX and XML escapes are mixed, etc.? Is the string "\\u1234" in fact converted properly by XMLMapAttrs if stored by the user? If we use some custom encoding not defined by XML it must be clearly documented and we must be careful that it is 100% reversible.
it's too late. NB 3.3 is going out, we'll have to be backward compatible with the format we use now.
It can be achieve in back comaptible manner, but in next release.
Fixed in trunk. There are still used Java-style \uXXXX Unicode escapes for ISO control characters and minimal set of character entities (see XMLUtil.toAttributeValue). XMLMapAttr.java new revision: 1.32; previous revision: 1.31
verified in the trunk
Resolved for 3.4.x or earlier, no new info since then -> closing.