Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > File I/O and Registry > Writing double byte characters into Ascii file


Reply
 
Thread Tools Display Modes
  #1  
Old 06-02-2003, 05:38 AM
Rajeshnerenki Rajeshnerenki is offline
Newcomer
 
Join Date: May 2003
Posts: 5
Default Writing double byte characters into Ascii file


Hi,

I need to write some text string reading from a database into ascii file. The string could be a mix of English and double byte characters like Japanese etc.

Can I write in the following way (sequential file type)

Open FileName For Append As #1
Print #1, text
Close #1

or do I need to open a binary file for writing??


Thanks
Reply With Quote
  #2  
Old 06-02-2003, 09:45 AM
SenorPr0n's Avatar
SenorPr0n SenorPr0n is offline
Regular
 
Join Date: May 2003
Location: The vicinity of the area.
Posts: 75
Default

I think that you should save the ascii value of each character, or whatever the ascii equivalent of double byte characters are. Write that to file, and then use Chr(ascii value) to convert it into an ascii character. I'm not sure how you would convert double byte values, but my guess is that there is an api for that.
__________________
These are the best sigs I've seen so far:
There are 10 people in this world: Those that understand binary, and those that don't. (Optikal)
There's no place like 127.0.0.1
Those who live by the sword get shot by those who don't! (Banjo)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation Problem - PLs help urgenlty dpdsouza Installation / Documentation 4 12-02-2004 07:09 PM
Handling Double byte characters in ASCII file Rajeshnerenki File I/O and Registry 1 05-31-2003 03:49 PM
Validate picture PrOpHeT General 6 04-07-2003 09:57 AM
Text formattting watkins General 16 04-23-2002 12:01 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->