Invalid EXIF text encoding for UserComment

I'm using Directory Opus (12.0.13) to write a file's name to metadata prior to renaming the file. When I use the script below, kindly provided by this forum, I find that:
a) only image files such as jpg and TIFF have their metadata written. The User Comment field of camera raw files remains empty.
b) EXIFtool reports:
Warning: Invalid EXIF text encoding for UserComment
User Comment : ´╗┐DSC04447.JPG
The file name is written to the User Comment field but preceded by extra characters.
c) I can read the User Comment in EXIFtool and in DO's metadata field. However my digital asset management software (IMatch) shows it blank despite correctly showing other metadata. I suspect this is due to the invalid EXIF encoding.
The script used to write metadata is:
@nodeselect
@sync:dopusrt /acmd SetAttr {filepath} META comment:{file}
Can anybody help me modify the above script to eliminate the invalid encoding? I'm in over my head and relying solely on contributions from the community.
Thanks
Robert

The comment string looks like UTF-8 with a BOM (byte order mark) at the start to indicate it is UTF8. As far as I am aware, that is valid for EXIF data, although there so many different interpretations and implementations of the EXIF specification that not everything will handle it.

Tagging support for some types of Raw files is fairly limited, since every camera manufacturer's raw files are potentially different (and different again for each camera model), raw is usually not a documented format (the ability to view raw files typically relies on people reverse-engineering the data), and trying to modify them could corrupt them. It can depend on the type of Raw file, but I would generally advise against modifying their tags and treat them as 'original pristine archive copies never to be modified' myself, assuming they are being used for what raw files usually are. (Depends on your workflow, of course!)

That advice regarding leaving raw files untouched is very sensible Leo. I'll use it. It won't be a handicap so long as I ensure I record a jpg file when I record the raw file. I'll then write the jpg's file name to metadata before renaming both jpg and raw file together. As DO's rename function neatly allows the two files to keep the same name stem I can find the raw file I need by finding its corresponding jpg file using the metadata.
Thank you
Robert

Thanks for reporting that, we'll fix it in the next update.

Hi Leo
An alternative to writing meta data to raw files would be writing to the file's XMP sidecar file. I'm doubt this is a better solution to shooting jpg with raw and writing metadata to jpg only. The latter can be done in one step inside DO alone and simpler is always better.
regards from Robert