Antonio
Is there any reasonable chance i can get a fix on the above problem ?
I have to deliver the printer and the app next tuesday.
Thanks for reply
Richard
Antonio
Is there any reasonable chance i can get a fix on the above problem ?
I have to deliver the printer and the app next tuesday.
Thanks for reply
Richard
HB_FUNC( WRITE233 ) // hComm --> lOk
{
DWORD cBytes;
unsigned char ch = 233;
hb_retl( ( BOOL ) WriteFile( ( void * ) hb_parnl( 1 ), &ch, 1, &cBytes, NULL ) );
}It returns .t.
Richard
Richard,
Then it means that WriteFile() is working ok ![]()
Are you able to print those characters from Pocket Word ?
Yes no problem
Even the txt file created from fwppc can be printed OK when selected and sent via bluetooth to the printer.
To make it clear, my app first generates a txt file then sends it to the printer.
This is why i asked for a workaround if we can simulate the "send via bluetooth" from fwppc, the problem is fixed as the printout is perfect
Richard
Anonio
This is the last test i did, here is the code
function Main()
LOCAL HOUT1,CFILE
cfile := CurDir() + "TEST.txt"
IF FILE(CFILE)
ferase(cfile)
ENDIF
HOUT1 := fCreate( cFile )
FWRITE( HOUT1, "THIS IS A NON ACCENTED LINE" + CRLF )
FWRITE( HOUT1, "à éè€ù° Accented LINE" + CRLF )
fClose( hOut1 )
Sendblue( MemoRead(cfile))
// SENDBLUE("à éè€ù° Accented LINE") THIS DOES NOT WORK ACCENTED CHARS DO NOT SHOW
RETURN Nil
STATIC FUNCTION SENDBLUE(ctext)
LOCAL i, hOut
hOut := CreateFile( "COM5:",GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL )
IF hOut==-1
MsgStop("Port Not Found")
ELSE
FOR i = 1 TO Len( cText )
WriteByte( hOut, Asc(SubStr( cText, i, 1 ) ) )
NEXT
CloseHandle( hOut )
ENDIF
return nil
The printout direct from fwppc is bad , i have scanned it , you can see it at
The printout that comes out of the txt file is OK you can see it at
Now just a confirmation, as far as i know, Ascii codes are related to fonts, Isn't it so ? What is the default font set by the pocket and how to change it to "courrier new" for instance before transmitting ?
Can this be the problem ?
Thanks for the reply
Richard
Richard,
> Ascii codes are related to fonts, Isn't it so ?
Ascii codes are numbers from 0 to 255, to select a char from the used chars table (of a font).
The used font must be selected from the bluetooth printer. I guess we can not select it from the Pocket PC as we are just sending bytes to a "file", unless some combination of them may specify to use a special font for the bluetooth printer. I may be wrong
Antonio
Open UESTUDIO, VIEW, ASCII TABLE
Code 233 is OK in major fonts and it displays é correct
Select "Terminal" as font and you will see that the retreived codes look a lot like what is being printed... This is what makes me think of a font problem.
The txt file you see the image in my previous post has been printed from the pocket pc through file explorer, send via bluetooth. So the printer can print the codes when coming from an ascii txt file.... If i could send automatically the txt file to the printer (like file explorer does), that would be great, but i have not found how. Any idea ? ![]()
Richard,
>
Select "Terminal" as font and you will see that the retreived codes look a lot like what is being printed... This is what makes me think of a font problem.
>
Ok, now I see what you mean. Have you checked if there is a way to set a default printer font from the printer side ?
Richard Chidiak wrote:Code 233 is OK in major fonts and it displays é correct
Enrico
My fwppc app creates on the pocket pc a txt file containing accented chars like 223.
Printing on the pocket pc (not from fwppc) but from file explorer to the printer prints all the chars perfect !
The chars can not be printed from fwppc and i suspect a font problem not from the printer ! There are no settings on the printer. I tested through 2 different printers and 4 different pocket pcs. i think the problem is in fwppc. I hope someone else can test accented chars on Bluetooth printing and confirm the problem. Anyone ?
EMG :> you have to make a conversion before sending the characters to it
This is what i wanted to avoid . Very risky.
I will abandon printing from fwppc till we find a correct solution and ask the users to select the txt file and print it via file explorer. I will search also if i can find a program that can send files to BT printer and see if it can be called from a fwppc app.
I am not happy with this, it is the first time we deliver a problematic app ! And we have to deliver tomorrow !
Richard
Richard Chidiak wrote:Enrico
My fwppc app creates on the pocket pc a txt file containing accented chars like 223.
Richard Chidiak wrote:Printing on the pocket pc (not from fwppc) but from file explorer to the printer prints all the chars perfect !
The chars can not be printed from fwppc and i suspect a font problem not from the printer !
Emg>It's not the same as sending characters through bluetooth. You are still not sure what the printer really receives.
This has been tested also with the same result
As per Ascii chars, they are different with fonts !!!!
Look at 223 ascii char forr example in Courrier new or Terminal font or system font, you will see it is displayed quite differently.
EMG>I repeat, on what exactly comes out from the bluetooth and I don't know of any other way than connecting the bluetooth cable to a PC and directly read and show each single character that is received.
How ? i have tried without success, any sample ?
Thanks for your help,
Richard
Richard Chidiak wrote:As per Ascii chars, they are different with fonts !!!!
Richard Chidiak wrote:Look at 223 ascii char forr example in Courrier new or Terminal font or system font, you will see it is displayed quite differently.
Richard Chidiak wrote:How ? i have tried without success, any sample ?
Richard,
Is there an online docs for your bluetooth printer ?
There has to be a way to change the used font on the printer