|
-
May 23rd, 2025, 12:37 PM
#1
Thread Starter
Fanatic Member
RC6: Best practice for detecting text encoding
Hello!
I have learnt so much about detecting text encoding that I know that it has to be guessed.
I am using RC6, and I wonder what the best practice is to either detect the decoding. I have not found such a method, but perhaps I overlooked it.
Or if it doesn't exist, then it would be great to hear how others do it.
Currently I use new_c.fso.ReadTextContent and have a look at the characters to detect the encoding.
But I wonder if I should call .ReadByteContent instead, and since it doesn't have a range option, I wonder what RC6 sees as the best way to handle this topic.
Thank you!
-
May 23rd, 2025, 01:23 PM
#2
Re: RC6: Best practice for detecting text encoding
When you use cFSO.ReadTextContent, it will autodetect the encoding if the file starts with a known BOM (Unicode BE, Unicode LE, or UTF-8). For files without a BOM, I think you would have to come up with your own heuristic (or use someone else's) to make an educated guess at the encoding
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|