• 4 Posts
  • 211 Comments
Joined 11 months ago
cake
Cake day: January 5th, 2024

help-circle










  • Yup, the .text “file” is binary, and I assume it’s exactly that - the executable machine code - but I did not try opening it with any hex editor or disassembler. I tried with a text editor, knowing in advance that it’s going to fail, and it did - there were a bunch of null or error characters shown and the editor crashed soon after.

    I honestly didn’t look any further into it, because I just don’t care. Archive Manager apparently just splits up the sections of the .exe and exposes them as if they were files in an archive. Seems as useful an approach as any.


  • NeatNit@discuss.tchncs.detoProgrammer Humor@lemmy.mlblahaj
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    4 months ago

    I’m assuming Unicode anyway, and UTF-8 is by far the most natural because most files will be in ASCII. A “normal form” (see link above), you might think of it as a canonical form, is a way to check if two strings are equivalent, even if they encoded the text differently. Like the example mentioned on Wikipedia:

    For example, the distinct Unicode strings “U+212B” (the angstrom sign “Å”) and “U+00C5” (the Swedish letter “Å”) are both expanded by NFD (or NFKD) into the sequence “U+0041 U+030A” (Latin letter “A” and combining ring above “°”) which is then reduced by NFC (or NFKC) to “U+00C5” (the Swedish letter “Å”).


  • NeatNit@discuss.tchncs.detoProgrammer Humor@lemmy.mlblahaj
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    4 months ago

    Well, I did get my hands on an exe file (some game on Steam) and opened it with Archive Manager. It does show some files, but the file properties say Type: application/x-ms-dos-executable (as opposed to application/zip). So it’s not an actual archive file, the archive manager is just displaying it as such to be helpful.

    The “files” I can see are:

    /.text
    /.reloc
    /.rsrc/version.txt
    /.rsrc/ICON/2.ico
    /.rsrc/ICON/3.ico
    /.rsrc/ICON/4.ico
    /.rsrc/GROUP_ICON/32512.ico

    I tried to create a zip file and rename it to .exe, but Archive Manager failed to open it at all which I found strange. You’d think it would look at the actual file contents to figure out what type of archive it is, and not rely on the extension.



  • Good point. Do filesystems use a normal form to at least prevent having two files with effectively the same name?

    I should point out the flip side though, that there’s no avoiding Unicode in filenames. Users in languages that don’t use the Latin alphabet (such as Japanese, Chinese, Korean, Hebrew, Arabic, Greek and Russian, and the list could go on) can reasonably expect to be able to give a file a name they can read and understand with no extra effort. All the software woes that come with it - too bad, software needs to deal with it.






  • Unicode in filenames? Are you crazy?!

    Okay that was /s to some extent but I gotta rant, I’m totally convinced that there’s still new software today that completely trip over themselves when files or paths have non-ASCII characters, or sometimes even a space. Incompetence didn’t go anywhere.