Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I have a folder name in japanese.CFileDialog getpathName is returning some Question marks when the folder is selected. Is there some way to solve it?
regards,
sherin
Posted
Updated 9-Nov-11 2:52am
v2
Comments
Roger Allen 9-Nov-11 7:30am    
Is your project being build in UNICODE?
sherin_ 9-Nov-11 22:40pm    
No
Paul Heil 10-Nov-11 14:28pm    
Your project must be built using UNICODE to support Japanese.
Paul Heil 9-Nov-11 15:59pm    
Can you show your code using the CFileDialog?
Also, verify you're using wide-characters. (you should see WCHAR, LPWSTR, std::wstring, etc...) If you're using TCHAR or LPTSTR, then verify your code is being compiled for unicode and has the UNICODE #define set.
sherin_ 9-Nov-11 23:46pm    
CFileDialog dlg(TRUE, NULL, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, "JPEG Files (*.jpeg, *.jpg)|*.jpeg; *.jpg||", NULL );
if (dlg.DoModal() == IDOK)
{
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
FileName = dlg.GetPathName();
Standard_CString aFileName = (Standard_CString)(LPCTSTRFileName;
}


CString FileName;
CFileDialog dlg(TRUE, NULL, NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, _T("JPEG Files (*.jpeg, *.jpg)|*.jpeg; *.jpg||"), NULL );
if (dlg.DoModal() == IDOK)
{
    SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
    FileName = dlg.GetPathName();
    //Standard_CString aFileName = (Standard_CString)(LPCTSTR FileName);
}
 
Share this answer
 
Comments
sherin_ 10-Nov-11 7:27am    
It returns ?? in place of japanese characters
Selva K 10-Nov-11 22:36pm    
while creating the project select UNICODE check box
Set your project to use Unicode.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900