Solved

Unicode Path to Multibyte correct

Posted on 2010-11-25
3
412 Views
Last Modified: 2012-05-10
Hello,
a question about Paths: I have a Path with a greek word inside. This I have to pass to a DLL with Multibyte. But nothing is working. From:
C:\Users\¿¿¿S¿¿S\Desktop    <----sorry, please see attached image
I got:
C:\Users\?!?!?!\Desktop
Is it somehow possible to bring a Unicode String to A MultiByte DLL?
I read about "GetShortPathName" and functions like SetFileApisToOEM() or SetFileApisToANSI(), but I have no idea how. Any help is welcome.

Ocrana greek path
0
Comment
Question by:Ocrana
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 34213779
'WideCharToMultiByte()' (http://msdn.microsoft.com/en-us/library/dd374130%28VS.85%29.aspx) is what you would use here, e.g.
wchar_t awcPath[MAX_PATH] = L"c:\\path";
char acPath[MAX_PATH];

// codepage 869 is 'OEM Modern Greek', see http://msdn.microsoft.com/en-us/library/dd317756%28v=VS.85%29.aspx ("Code Page Identifiers")
WideCharToMultiByte(CP_869,WC_COMPOSITECHECK,awcPath,wcslen(awcPath),acPath,MAX_PATH,NULL,NULL);

Open in new window

0
 
LVL 5

Expert Comment

by:greatsubash
ID: 34215632
Please refer the below link, may be it is useful,
http://msdn.microsoft.com/en-us/library/ey142t48(VS.80).aspx
0
 

Author Closing Comment

by:Ocrana
ID: 34220360
ot the right codepage but easy to find. Thanks
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question