Does anyone happen to know what the encoding format is for the users.dat file in the workshared project backup folder? I would like to use it to get a list of everyone who has worked on the project. I can open it in notepad and see the list. There is weird formatting. Opening it in Code Writter has better formatting, but there is no spaces between users entries.
Thanks
Solved! Go to Solution.
Dear Michael,
Thank you for your query.
I cannot tell off-hand.
Can yu attach a sample file to explore, or would that divulge confidential info?
Best regards,
Jeremy
I have attached the file, as well as screen shots from Code Writter and Notepad
I finally got back to this, and it is a string of escape characters. Sometimes the Users.dat file begins with "\f" sometimes "\r". There is always the null character "\0" in between every character. In between each user entry is a control character. Sometime it is "ACK" sometimes Device Control 1-4.
So it looks like the easiest way to get the user list is to parse out the special ascii characters and look for null and a control character next to each other as a break in between users.
Have you tried to interpret this simply as a Unicode text file?
Here are my results opening it in a text editor on the Mac:
It looks like this in Visual Studio using automatic text encoding:
Cheers,
Jeremy
Dear Michael,
Here is another suggestion:
https://www.crummy.com/software/BeautifulSoup/bs4/doc/#unicode-dammit
It is pointed at (along with many others) in the discussion on determining the encoding of text in Python:
https://stackoverflow.com/questions/436220/determine-the-encoding-of-text-in-python
I found that searching the Internet for 'python determine text encoding':
https://duckduckgo.com/?q=python+determine+text+encoding
... Later...
The encoding is indeed a bit hard to nail down.
I installed the Python charset project, which also installs a `chardetect` utility.
https://pypi.org/project/chardet
Running chardetect on users.dat simply reports:
$ chardetect users.dat users.dat: ascii with confidence 1.0
Unfortunately, that is no big help.
Ah well, you seem to have it under control, anyway.
Cheers,
Jeremy
Can't find what you're looking for? Ask the community or share your knowledge.