CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004
    Posts
    20

    Question How to read a unicode file

    I have a unicode file and i want to read the contents of that unicode file, convert to MBCS for further proceedings... if any one knows how to read pls let me know
    i tried with fgetws and fgetwcto read the contents but failed.

    thanks in advance
    kiran

  2. #2
    Join Date
    Apr 2004
    Posts
    76
    Hi Narik,

    WideCharToMultiByte () is your friend. See http://msdn.microsoft.com/library/de...icode_2bj9.asp

    Also, I would probably use CFile and a CString - its just much easier.

    You may also want to read the MBCS Survival Guide located at http://msdn.microsoft.com/archive/de...sdn_mbcssg.asp.

    Finally, if you are using MFC, you have the conversion macros at http://msdn.microsoft.com/library/de...otes_tn059.asp.

    Jeff

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured