Hi,
I have certain data stored in tamil font (TAM-TTValluvar) I am creating a text file using PRINT #1,<fieldname> through VB6. The output in the text file looks like a bunch of junk characters and I could not able to take the printout from my dot matrix printer either by using "TYPE a.txt > prn" command or through MS-Dos Editor... Someone Please help me and provide me solution...

Thanks
Satyanarayanan. G

Well considering that you are using a binary file to store data in you might need to open the file as binary. Then read the file or part of the file in that you need and then strconv it from vbfromunicode, but it is hard to tell without seeing your code or data...


Good Luck

Well considering that you are using a binary file to store data in you might need to open the file as binary. Then read the file or part of the file in that you need and then strconv it from vbfromunicode, but it is hard to tell without seeing your code or data...


Good Luck

Hi Vb5prgrmr,

First of all thanks for you for spending time to resolve my problem. Now, Regarding data, it is stored in SQL Server. Basically the data is stored using ISM V5. However I managed to decode the data and convert the same to Trutype font. Now the problem is while I try to print the data using statement "PRINT #1, mytbl!Ownnamet" I get junk characters while open the file using MS-DOS editor but if I use notepad and change the relevent tamil font I get the output. I need that tamil output to my ms-dos editor.. Is it possible?? Pls provide me the solution..

Thanks....Satya. G

Okay, so what you are saying is that you have extracted a binary file from sql server and this binary file is a font. Right? Okay then, you will need to save the font to the hard drive and use the API AddFontResource. Then you could do set printer.fontname = fontname or me.fontname = fontname if you wanted it for your current display.

But that will not say that this certain text file will always be displayed with this certain font... Text files only hold text. No formatting, no special characters, nada!

So, if you are using edit in dos, I'm not sure that it uses anything other than the system font for display. Unless you have some sort of fancy dos editor that allows you to select fonts...

Good Luck

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.