Results 1 to 21 of 21

Thread: [RESOLVED] Loading a unicode text file

Hybrid View

  1. #1
    Frenzied Member some1uk03's Avatar
    Join Date
    Jun 2006
    Location
    London, UK
    Posts
    1,675

    Re: Loading a unicode text file

    If you don't want external files then have search for the

    ReadFile APIs and WriteFile APIs..

    If i have time, ill post an example later...
    _____________________________________________________________________

    ----If this post has helped you. Please take time to Rate it.
    ----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.



  2. #2
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Loading a unicode text file

    You don't need to use API calls to read Unicode (UTF-16LE) text files. You just need to do as I suggested earlier.

    The attached demo contains a simple UnicodeReader.cls I threw together based on another similar class. It has a few "extras" you might not need but it is pretty lightweight, has no external dependencies, and should not have any serious bugs. You could rip out the logic and use it, pretty it up a bit, or just use it as-is in a new Project.

    To run the demo you need the Microsoft Forms 2.0 controls, which of course have issues including not being redistributable. You can get these a number of ways, including by having Office (2000 or later?) installed. The TextBox control from this set made the demo easier because it can handle pure "Unicode" and display multilingual Charsets simultaneously.
    Attached Files Attached Files

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