473,398 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Filename encoding on XP

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
1 1758
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Ralph Freshour | last post by:
I have a PHP web app using MySQL - when I save a .jpg file named test's.jpg I see that the filename on the unix server is: test\'s.jpg - the filename I end up saving in my SQL table is named...
7
by: Kornelius Finkenbein | last post by:
Hello folks! I've got a strange problem with my download-script in conjunction with M$ internet explorer, if the filename I want to link to includes more than one points. In Netscape the problem...
4
by: vincent_delft | last post by:
I've a simple python script that read a directory and put the files into a Zip file. I'm using the os.walk method to get the directory content, I'm creating ZipInfo objects and set "filename",...
4
by: Hans | last post by:
Hi! I have a classic ASP site (not ASP.NET) where the user is able to download documents. The documents are stored inside an Oracle database set up for UTF-8 encoding. In the VB6 code (COM+)...
1
by: rudderstick | last post by:
Hi there all, I have an interesting problem.... I work for a company that develops software for the building industry and would like to distribute one of our software products via the web. ...
1
by: CB | last post by:
Using C# in .Net 2003, DataSet.ReadXml fails when a percentage (%) sign is in the filename followed by 2 hex characters. Seems that the % sign is likely encoding the following 2 hex characters. ...
4
by: B Squared | last post by:
I'm trying to pass a filename (which is a jpeg image) to a php function / file so that it will display. I know that its simple to get PHP to display an image hardcoding in the filename. For...
4
by: Tim N. van der Leeuw | last post by:
Hi, I have a need to store directory and filenames in a database. For the database I chose to use UTF-8 encoding; but the actual encoding used is probably immaterial: whichever coding I take,...
0
by: jinnareddy | last post by:
Hi, I'm unable to download a file that is having a 2-byte char in its name (e.g.テ) using force download option. Though, am able to download file names involving ASCII chars. I have tried URL...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.