My scenario is that I am generating dcrs based on the output from a database query.I have recently found that some of the generated dcrs which contain the ® character will not compile. I was getting the error message - Invalid byte 1 of 1-byte UTF-8 sequence.I have encoded "®" using HTML::Entities::encode(HTML::Entities::decode($item), "\<\>\&\|\`\®"); . I am now getting the error message - The entity "reg" was referenced, but not declared.Any advise on how to declare the entity "reg"I have tried to encode "reg" using the folllowing;with no success.
I've used =~ tr/®/®/; but everything after & is being ignored, I reckon b/c of the #.