http://qs1969.pair.com?node_id=772306


in reply to Re^3: Weird encoding after grabing filenames
in thread Weird encoding after grabing filenames

Thank you very much that was waht i needed.

Allow me to ask this: Why only the path strings were plain ascii chars and the filenames were non-ascii which lead me to the extra use of Encode::from_to() to show it properly?

Does it has to do with the way(type of encoding) Vista encoded its filenames? And if this is the case here why encode the folders differently?
  • Comment on Re^4: Weird encoding after grabing filenames

Replies are listed 'Best First'.
Re^5: Weird encoding after grabing filenames
by ikegami (Patriarch) on Jun 17, 2009 at 14:13 UTC

    Because some characters are encoded the same in both ISO-8859-7 and UTF-8. So even though you program was buggy, you still happened to get some correct output.

      But the data that actually got prined correctly weren't greek characters. They were data composed of english letters like "/home/nikos/public_html/data/text".

        Despite the "but", that doesn't contradict what I said. Those are characters that are encoded the same in both ISO-8859-7 and UTF-8.

        Specifically, U+0020..U+007E are encoded the same in ASCII, ISO-8859-* and UTF-8.