By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,050 Members | 1,019 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,050 IT Pros & Developers. It's quick & easy.

Filename encoding on XP

P: n/a
What encoding does the NTFS store the filename?

I got some downloaded files, some with Chinese filename, I can not
backup them to CD because the name is not accepted.

I use walk, then print the filename, there are some ? in it, but some
Chinese characters were display with no problem. I suspect the
encoding of the filename is not unicode. How do I find out more about
this?

--
Sin Hang Kin.
Jan 3 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
kent sin schrieb:
What encoding does the NTFS store the filename?
In UTF-16LE. However, on-disk storage is mostly irrelevant, what
matters is what encoding is used on the OS API.

Windows has two forms of file API: Wide (Unicode) and ANSI
(byte-oriented). On NT, the Wide API is "native"; the ANSI API
converts strings forth and back (introducing ? if the conversion
fails).
I use walk, then print the filename, there are some ? in it, but some
Chinese characters were display with no problem. I suspect the
encoding of the filename is not unicode.
You need to pass a Unicode string into walk as the directory; then
recursively all results should also be Unicode strings.

Regards,
Martin
Jan 3 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.