Inserting null characters

Please use this Board for QBasic related requests ( file research, programming, etc.)

Moderators:Administrator, Global Moderator

Post Reply
Martin E
Inserting null characters

Post by Martin E » Thu Sep 29, 2005 2:07 am

I actually use VBDOS, but I do not avail myself of the "V", functions at all, so I essentially program in QuickBasic. I am trying to convert an ASCII text file to Unicode. To do so, in a text string besides the inital hex characters of FF and FE, every ASCII character has to be preceded by a null (00) character to make it double-width. Using the ususal Basic MID$ and "+" functions, I cannot add any more characters after the first (00), the string refuses to be concatenated any further. Is this a peculiarity of VBDOS or does QBasic/QuickBasic also experience it? If so, is there a workaround?

Quibbler

Post by Quibbler » Thu Sep 29, 2005 6:54 pm

Doesn't seem to be any problem in qbasic

Code: Select all

a$="ABCDE"
for i=1 to 5
b$=b$+chr$(0)+mid$(a$,i,1)
next i

Post Reply