Fixed a problem as it failed with non-ascii attributes

...ith non-ascii attributes.