Printing Arabic on receipt printer using jpos - printing

I am trying to print Arabic characters on a receipt using jpos. I send the proper string to the printer but only question marks are being printed.
Does anyone have experience with printing Arabic characters using jpos? If so, do you have any pointers for me.
Many Thanks,
Scott

Related

Delphi 2009 - Sending Printer Commands in UTF8

I am writing an Delphi 2009 program that sends the escape command to the label printer for printing barcode. Refer to Sending printer specific commands, I can use Windows.Escape() to do the job. But my question is our database stores UTF8 data(for storing different languages), may I ask if Windows.Escape() accepts UTF8 data?
Thanks
*I discovered that Escape accept PAnsiChar...
When using PASSTHROUGH, as the linked code does, the Escape API accepts raw 8 bit data which is not processed in any way by Escape. The data is passed directly to the device.
You can learn about the Escape function from its documentation: https://msdn.microsoft.com/en-us/library/windows/desktop/dd162701.aspx
If the printer understands UTF-8, then your approach should work. But, if the printer does not understand UTF-8 it will fail. In other words this is not really a question about Escape, but rather a question about your printer. You will need to consult its documentation.
Reading between the lines of your question, it seems that you are letting the encoding used in your database drive your thinking regarding printing. That seems to me to be mistaken. There's no connection between your database and the printer. Whether or not your printer understands UTF-8 is unrelated to your database text encoding. You need to first work out what encoding the printer needs. If it is not the same as used by the database, then you will need to convert. Converting from one encoding to another is usually straightforward.

Generate a localized random NSString

Apologies if this has already been asked, but some google search could not find it.
Does anyone please know of any method to generate a random string in iOS which respects the current language of the device?
The idea is that a quick 'unlock code' can be generated using the function; the trouble is that for languages other than English entering the code using the keypad will not be quick or intuitive, particularly if the user does not have the English keyboard enabled.
One easy option would be to generate your string using just the digits 0-9. Then present the standard number pad.
However, you should verify that the standard number pad actually shows the digits 0-9 for all locales. Good ones to verify would be Arabic, Chinese, and Japanese locales, I don't recall for sure what shows in those cases.

Danish characters not supported on UTF-8 encoded application

I am working on a application based on java, javascript(dojo). When the user enters danish characters, they are converted into question marks. I have checked that throughout the application only UTF-8 encoding is used. Also I have tried different encoding schemes but to no-effect.
One solution I found suggested to save the data in a notepad file and then use the same.....that also yields nothing.
Can anybody suggest what might be causing this issue?
Appreciate your help!
thank you.

PDF417 generated by ZXingObjC is unreadable sometimes

I am trying to use ZXingObjC to generate PDF417 barcodes for my iOS app. I've got it all working, sort of. It generates the barcode and displays it on the screen. Unfortunately, sometimes the barcode is unreadable by a 'real' scanner.
If the encoded text is all just upper or lower case characters, for example, "Now is the TIME for all good men", then the generated barcode is perfectly readable.
However, if the string contains just one number, anywhere in the string, then the barcode is unreadable. It's just not recognized by the 'real' scanner.
Other encoded strings produce barcodes that decode as gibberish.
I am wondering if I need to do more configuration to generate PDF417s properly. For example, it says on the ZXingObjC website "Use UTF-16 for all PDF417 characters". How would you do that?
Are there other configuration options I should be setting?
I know this is an obscure topic, but hope someone has some knowledge about this. Thanks in advance.

Printing Barcodes on RuggedJet printer

I need to print a barcode on a Brother RuggedJet printer from a Window Mobile device. The SDK provided by brother does not have a method to do this.
However most printers have a native mode that you can put them into and then send escape sequences to do things like print barcodes. I've done this with other printers.
Does anyone know the native printer language for the Brother RuggedJet? And if so what are the escape code to print Code 123 barcodes.
You should contact Brother's Customer Support to see if they can get you in touch with some department that deals with the SDK or Technical Documents for their products.
I use Code 128 for our Barcodes, and to get them to print out, I use the OnPaint event to write using e.Graphics. I could post some of that code here, if you can use Code 128, but most of it I found from someone else, and I honestly never took the time to understand what it is doing.

Resources