Loading DBCS Text Files Into VB 6.0

Posted on 2008-11-15
Last Modified: 2013-12-25
Does anyone know how to get VB 6.0 to convert a DBCS text file  into 16 bit Unicode using the DBCS code table specified in the Windows language environment settings?  I'm trying to read a Big5 text file and even though I have set the language for non-Unicode programs to Chinese in Regional And Language Options in Windows, VB reads each character in the file as a single 8-bit byte (i.e., it doesn't convert dbcs byte pairs to 16-bit words).

Alternatively, Does anyone Have Any DBCS To Unicode Conversion Code For VB or C?
Question by:NeilCampbell
    LVL 3

    Accepted Solution

    VB6 is is really interesting when it comes to externally using unicode. Here is a link to the Microsoft Support site on how to do this


    Author Comment

    The reference, though it talks about reading DBCS Unicode files, doesn't shed any light on converting the byte data read in into 16-bit Unicode.

    Author Comment

    I found what I was looking for: VB Provides a StrConv function that will convert DBCS Unicode to 16-bit Unicode and vice versa.

    Author Closing Comment

    Thank you for this link.  This got me started down the right path.  I later found the function (StrConv) that will convert DBCS Unicode to 16-bit Unicode and vice versa.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Introduction This article makes the case for using two modules in your VBA/VB6 applications to provide both case-sensitive and case-insensitive text comparison operations.  Recently, I solved an EE question using the LIKE function.  In order for th…
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now