Non-ASCII characters not supported in RML barcodes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Confirmed
|
Wishlist
|
OpenERP's Framework R&D |
Bug Description
Hello.
I make an RML report with barcode of "code128 " kind.
Is there a way to insert a special FNC1 symbol (field delimeter) in the barcode? This is required this because there are fields of variable length in barcode.
The Reportlab documentation says: "Code 128 is a very compact symbology that can encode the entire 128 character ASCII set, plus 4 special control codes, (FNC1-FNC4, expressed in the input string as \xf1 to \xf4)."
So Python code like "bar=code128.
But when i try to insert this symbol between <barCode> an </barCode> inside RML template i get:
File "reportlab\
File "reportlab\
File "reportlab\
File "reportlab\
File "reportlab\
File "reportlab\
File "reportlab\
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf1 in position 0: ordinal not in range(128)
Tried to insert it many ways: ñ ñ; [['\xf1']] or [[u'xf1']]
I think something is wrong in trml2pdf.py... it transmits an unicode string where should be "simple" one
Seem I've found a way to correct it.
Using pached trml2pdf and inserting ñ symbol in RML file.