Printing Korean with Openbravo POS
By Scott Seong
Openbravo POS does not support printing Korean characters out of the box. To be able to print Korean characters on receipt or kitchen printer, a careful selection of supported printer is a must. Our requirements dictate an ability to print Korean characters on Kitchen printer, and to accomplish this we purchased Epson TM-U220 impact printer. However, the version of TM-U220 printer we received didn't have the Korean fonts built-in to the printer. We were told by Epson to purchase a TM-U220M (the last "M" stands for multi-language), but careful review of the printer specification doesn't seem to allow printing Korean (we have never verified whether TM-U220M will print Korean). We then, turned to Star printer. The support staff was very supportive and suggested SP700 printer. However, it turned out that SP700 did NOT have Korean fonts built-in to the printer. Star offered to replace the SP700 with SP500, which we finally got it to work.
Here are a few things we did to make Star SP500 to print Korean menu on the kitchen printer.
Once you have the Unicode to Star Character Code translation done, you'll have to add them to the UnicodeTranslatorInt.transChar() method. The java "char" primitive data type is a 16-bit, which is capable of storing 2-byte Unicode or a 2-byte Star Character code. The "byte" cannot represent Star Character code, so the signature of transChar() method has to be modified to return "char" not "byte". The translation is done via switch statement with each unicode returning Star Character Code. There are more than 2400+ translations, which make up the enter Korean language set.
There are two more files to change: UnicodeTranslator and DeviceDisplayESCPOS files. The transString() method needs to be modified to support Korean strings. We've called it transKoreanString(), which slightly defeats the purpose of using UnicodeTranslator super class but it's an adhoc implementation with intent to use in Korean environment only.
- For those who haven't decided on the printer yet, you'll need to purchase a printer with the built-in Korean fonts. Openbravo POS is designed to send character codes to the printer without any bitmap manipulation, so if the printer does not have the fonts you're out of luck.
- Characteres entered into the database will be stored in UTF (unicode) format, and the printer will NOT be able to print Unicode characters. A translation table is needed to translate "unicode" to "star" character code format. Star sent us two documentations to help us with Korean integration:
In order for Openbravo POS to support Korean language in the application, the connection to the MySQL database should be made via UTF-8 character set. To set the default character set, the following url should be used:
By following the procedure above, anyone can use Openbravo POS to print Korean characters on the supported printers.
Additional Update: 11/11/2011
Star SP500 impact printer works well for Kitchen printer, but it's not suitable for customer receipts. We have been using a Lukhan LK-T11 thermal printer from Sewoo, but this unit is very slow in printing Korean. Also, the unit is not readily available in the United States. As a replacement, we've decided to use Star TSP700II series printer (TSP743II in particular). Star was pretty supportive in making the TSP743II termal printer to print Korean. We had to upgrade the firmware, and make a few configuration changes but overall it wasn't too difficult to do.
The Star TSP743II firmware upgrade kit with instruction is available for download at tsp700II_korean.zip