Solved

Reading foreign language using File system object in VB

Posted on 2006-06-23
1
196 Views
Last Modified: 2010-04-07
I have foreign language (Korean / Chinese) in a text file. Using File System object I am readling each line within the text file which is | (pipe) separated. The Readline method that is used is unable to read the foreign language data, English text is properly read.

Is there any way I can handle this?
0
Comment
Question by:Yogeshup
1 Comment
 
LVL 22

Accepted Solution

by:
danaseaman earned 500 total points
ID: 16969559
You must use "TristateTrue" or "TristateUseDefault" Flag to read Unicode. Having said that how are you displaying the strings? You need to use Forms 2.0 Object Library (comes with MS Office) controls or 3rd party Unicode aware controls. The Vb intrinsic controls will not display Unicode.

Private Const ForReading As Long = 1
Public Enum TristateEnum
   TristateTrue = -1        'Opens the file as Unicode
   TristateFalse = 0        'Opens the file as ASCII
   TristateUseDefault = -2  'Use default system setting
End Enum

Set objStream = objFSO.opentextfile(sFileName, ForReading, False,TristateTrue)

0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Vb.net 2008 2 59
bit defender blocks good applications 2 93
VBA filters 2 59
How to produce a SHA-1 hash function in vb6 in order to save it to a table 8 41
Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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 Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

785 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