SambaPOS Forum
English Boards => V3 Development => Topic started by: sukasem on September 19, 2013, 03:13:30 am
-
Hi there,
I just came across this useful method to count strings in Unicode format, useful for foreign languages. Since, ticket template format base on number of characters in each line so, the string length in regular method will result wrong formatting.
Here the solution:
http://stackoverflow.com/questions/12739648/number-of-characters-in-java-string (http://stackoverflow.com/questions/12739648/number-of-characters-in-java-string)
Hopefully, Emre will implement this in to next release ;)
Cheers,
Sukasem
-
Can you give more details about your problem? We already have some similar features.
-
In Thai, some characters is mark as replace so, it won't take up the space because it place on top or bottom of previous character.
I think that post gave very clear picture ;)
In their example, if you count characters regularly it have 7 characters but 2 are placed on top of the previous one (the on that mark as dash circle).
-
I understand that. Did you see this one before? https://github.com/emreeren/SambaPOS-3/issues/232
-
Yes I saw it. But I still have this issue with 3.0.27.
I am not sure if you will see this correctly.
░░░░░░░░░░░░░░░ T i c k e t ░░░░░░░░░░░░░░
Date:9/20/2013
Time:9:30 AM
Table: B12
Ticket No:8
------------------------------------------
- 1 Toasted Bagel Jam ไม่เอาเห็ด 1.50
- 1 Toasted Bagel Cheese 2.25
==========================================
Total: 5.51
==========================================
T H A N K Y O U
-
I've been learning JAVA for the last 2 weeks to manipulate ticket print out to overcome merge lines and use alternative order tag name to get Thai. I try to get all kitchen print out in Thai, item and order tag.
That why I came across that code and I do test it and it works.
-
I see. How many mark characters you have on ไม่เอาเห็ด word? 2?
-
Yes, 2 characters should not count.