troubleshooting Question

QT Qfile.exists returns false when existing file contains unicode chars

Avatar of JonMny
JonMny asked on
C++Linux
6 Comments1 Solution2418 ViewsLast Modified:
I have an application that uses QT c++ libs. One of the methods checks for the existance of a file before attempting to processes. The problem I have is the function returns false even when the file exists if there are unicode chars in the name.

The file name I am testing os
c:\هوoooooooooooooooहैFileName.mp4

The filename is passed as a command line arg

QFile fsrc(fileName);

if(!fsrc.exists()) //.exists() always returns false even if the file exists.
{

}
else
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros