in reply to Re^7: how are ARGV and filename strings represented?
in thread how are ARGV and filename strings represented?

Just playing devil's advocate: On linux it looks like it's possible to mount external filesystems (vfat, ntfs, iso9660?) with other encodings. What happens if the path up to the mount point is in utf8 and the path after the mount point is in another encoding?

It's true that no sane person would try this, but it is possible...

  • Comment on Re^8: how are ARGV and filename strings represented?

Replies are listed 'Best First'.
Re^9: how are ARGV and filename strings represented?
by afoken (Chancellor) on Oct 02, 2024 at 18:08 UTC

    It sure is possible, and it does not sound that insane if you are trying to recover data or the like. Just imagine working with legacy media (retro computing) or from other operating systems (e.g. MacOS, Windows, OS/2, ...). I did not assume that any filesystem would check the filenames for correct UTF-8 encoding, especially not ZFS, which comes from an old Unix and in my mind should store just bytes composing filenames.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)