Openbravo Issue Tracking System - Retail Modules
View Issue Details
0040294Retail ModulesWeb POS Hardware Managerpublic2019-02-28 16:352023-09-13 13:55
joniturralde93 
javierRodriguez 
urgentmajoralways
closedfixed 
5
pi 
piRR19Q2 
jorge-garcia
Gold
8151
No
0040294: Lines with Japanese alphabet characters don't get aligned correctly
Japanese characters are trated like normal characters when doing the calculations to align the line. This way, the line is either not correctly aligned or, in this case, more blank spaces than necessary are put, so a new line is created with those blank spaces.
This caused Japanese lines to be more separated than they should be, with an extra empty line between them.
1. Print a receipt in preprod Japan POS Terminal: https://<redacted>/openbravo/web/org.openbravo.retail.posterminal/?terminal=702345103 [^]
2. There is space between japanese lines despite the header not being configured to do so.
We added Hiragana and Katakana alphabets to the ones recognised as "Double sized characters" for the customer. This is [probably] a quick, temporary fix.


In class DeviceTicket.java, method isDoubleSpaceUnicodeBlock, we added both alphabets to the condition:


  public static boolean isDoubleSpaceUnicodeBlock(UnicodeBlock block) {
    return block == UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS
            || block == UnicodeBlock.HANGUL_SYLLABLES
            || block == UnicodeBlock.HANGUL_COMPATIBILITY_JAMO
            || block == UnicodeBlock.HANGUL_JAMO
            || block == UnicodeBlock.HANGUL_JAMO_EXTENDED_A
            || block == UnicodeBlock.HANGUL_JAMO_EXTENDED_B
            || block == UnicodeBlock.HIRAGANA
            || block == UnicodeBlock.KATAKANA;
  }
No tags attached.
png beforeFix.png (600,705) 2019-02-28 16:37
https://issues.openbravo.com/file_download.php?file_id=12693&type=bug
jpg afterFix.jpg (1,251,028) 2019-02-28 16:38
https://issues.openbravo.com/file_download.php?file_id=12694&type=bug
Issue History
2019-02-28 16:35joniturralde93New Issue
2019-02-28 16:35joniturralde93Assigned To => Retail
2019-02-28 16:35joniturralde93OBNetwork customer => Gold
2019-02-28 16:35joniturralde93Support ticket => 8151
2019-02-28 16:35joniturralde93Resolution time => 1553122800
2019-02-28 16:35joniturralde93Triggers an Emergency Pack => No
2019-02-28 16:37joniturralde93File Added: beforeFix.png
2019-02-28 16:38joniturralde93File Added: afterFix.jpg
2019-02-28 17:26joniturralde93SummaryJapanese alhpabets don't get aligned correctly => Japanese alphabets don't get aligned correctly
2019-02-28 17:28joniturralde93SummaryJapanese alphabets don't get aligned correctly => Lines with Japanese alphabet characters don't get aligned correctly
2019-03-11 10:14javierRodriguezAssigned ToRetail => javierRodriguez
2019-03-11 11:10hgbotCheckin
2019-03-11 11:10hgbotNote Added: 0110341
2019-03-11 11:10hgbotStatusnew => resolved
2019-03-11 11:10hgbotResolutionopen => fixed
2019-03-11 11:10hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.poshwmanager.sources/rev/cc9c9ecf92562bd157750c1e0c3f8879b5368c66 [^]
2019-03-13 13:26jorge-garciaReview Assigned To => jorge-garcia
2019-03-13 13:26jorge-garciaNote Added: 0110404
2019-03-13 13:26jorge-garciaStatusresolved => closed
2019-03-13 13:26jorge-garciaFixed in Version => RR19Q2
2023-09-13 13:55shuehnerSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=26823#r26823

Notes
(0110341)
hgbot   
2019-03-11 11:10   
Repository: erp/pmods/org.openbravo.retail.poshwmanager.sources
Changeset: cc9c9ecf92562bd157750c1e0c3f8879b5368c66
Author: Javier Rodriguez <javier.rodriguez <at> openbravo.com>
Date: Mon Mar 11 11:10:00 2019 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.poshwmanager.sources/rev/cc9c9ecf92562bd157750c1e0c3f8879b5368c66 [^]

Fixed issue 40294: Lines with Japanese alphabet characters don't get aligned correctly

Added new UnicodesBlock lines in isDoubleSpaceUnicodeBlock to make the printer know how to center it

---
M project/src/com/openbravo/pos/printer/DeviceTicket.java
---
(0110404)
jorge-garcia   
2019-03-13 13:26   
Code reviewed and tested