I have a file, created with the program "M-Print Pro, for Weidmuller". It has the file extension ".mpc" The file description given by the program is "Files with M-Print PRO contents"
This is an example of what it looks like via the program:
Now, I tried to look for a Python library to read the file, but unfortunately I didn't find any, since that kind of extension is commonly used for Musepack audio.
At this point, I simply tried opening it with:
r = open("C:/Users/Acer/Desktop/E3611310/CABLAGGIO.mpc", "r")
print(r.read())
What I get is the following error:
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f in position 188: character maps to <undefined>
I tried adding encoding="utf8", but still I get an error::
File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x84 in position 10: invalid start byte
What I'm trying to do are two, namely being able to read and recover the data of this type of file, and being able to create a similar file with new data.
Do you have any ideas on how I could solve it? Thank you all

As far as I can tell,
.mpcis a proprietary file format of that company. I wasn't able to find any documentation or specifications about that file format.Due to your problem I would suggest that the
.mpcfile format isn't saved as charcters withutf-8encoding (maybe no encoding at all..., could be their own encoding or bytewise). As always when proprietary file formats are involved I the only suggestions I can give you are: