Suppose I have a source file that is 18218 bytes.
I open the file in emacs, then do:
M-x end-of-buffer
M-x what-cursor-position
Why does the cursor position return 17612 bytes?
I think it’s because of CRLF translation, or collapsing CRLF into one character.
How can I get emacs to report the accurate, untranslated character position?
The behavior you describe is mentioned in the manual. No way of getting the “true” position is mentioned, which leads me to believe that you’re out of luck.
You can, however, open the file without any conversions applied like this: C-x RET c no-conversion RET C-x C-f filename. Then all of the character positions should match up correctly.