Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

UNICODE support

Posted on 2004-10-13
2
Medium Priority
?
261 Views
Last Modified: 2013-11-20
Hello All
I am downloading one file from web having encoding UTF-8 ( Unicode Support ). After downloading , I am reading the file into buffer in CString.But when I saw the buffer I found that there are some unidentified characters ( Looks like empty spaces but not spaces ). I am getting the same buffer though I converted it into UNIOCODE using MultiByteToWideChar.
like this
MultiByteToWideChar( CP_ACP, 0,str,strlen(str)+1, wszStr,256 );  

NOw what can I do to see those unidentified characters ?  If not possible , How can I remove those characters ?
Thanks in advance.
0
Comment
Question by:sonawane_ajay
[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
2 Comments
 
LVL 1

Accepted Solution

by:
cool_alok earned 600 total points
ID: 12297710
basically problem is that, basic display can't have basic Unicode support ,that why you are see ing the that boxes etc.

 now for removing these character you have to compare each character with ascii character set ie check ascii value each character .
hope this will work
 
0
 
LVL 12

Expert Comment

by:OnegaZhang
ID: 12297850
if the source is utf8, you should pass CP_UTF8 to MultiByteToWideChar

MultiByteToWideChar( CP_UTF8, 0,str,strlen(str)+1, wszStr,256 );  
look up msdn to see return value of MultiByteToWideChar, your buffer may be too small.

welcome to www.fruitfruit.com
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…

618 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