maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   mbarcode (https://talk.maemo.org/showthread.php?t=34996)

cicer 2010-10-19 21:18

Re: mbarcode
 
It seams that it doesn´t support written accents. Instead of an "á" or an "ó" it displays an square. Is it my problem or an issue with the program.

lardman 2010-10-19 21:20

Re: mbarcode
 
Quote:

Originally Posted by mrsellout (Post 845421)
This is yet another great app for the n900. I've been using it for a few months now and it keeps getting better and better and I want to say thanks... THANK YOU!

Glad you like it :)

Quote:

Originally Posted by mrsellout (Post 845421)
Right you asked for feedback and I'll provide. Yes it does startup quicker. It does feel smoother and the scan on request feature is great. There is one slight issue with the new build though. On startup the display gives a high fps reading (~70fps) until one opens the camera shutter. Now I don't open the shutter first because that loads the camera app, and sometimes it's a while before I actually use the app after starting it. I use this app in conjunction with PresenceVNC so I can copy the barcode into a proprietory Windows application. Sometimes the program needs to be started up and logged into. And sometimes a customer comes into the shop and I have to put the phone down and serve them, all before realising that I've not opened the shutter. So you can understand my concern.

Hmm, interesting. Really the pipeline should be stopped if the shutter is closed, I'll have to talk to Dragly about this as he's the OpenGLES guru.

Quote:

Originally Posted by mrsellout (Post 845421)
One more thing if I may, can you enable the scan to be activated by the spacebar? I tend to use the app with the keyboard open and it's not that easy using the shutter button with the screen up.

This is still a fantastic app even with the little issues.

Thanks again,

mrsellout

Sure, that should be reasonably easy to implement. I'll take a look at it for you (and I also find it a pain to click the shutter button with the screen open while testing tbh!)

lardman 2010-10-19 21:21

Re: mbarcode
 
Quote:

Originally Posted by cicer (Post 845448)
It seams that it doesn´t support written accents. Instead of an "á" or an "ó" it displays an square. Is it my problem or an issue with the program.

The program I imagine. I'll need to check whether the backend supports accented characters or if it's simply a problem with the data being passed through mBarcode. Do you have an example handy for me to test on?

cicer 2010-10-19 22:27

Re: mbarcode
 
I created this one with all the vowels:

lardman 2010-10-20 09:47

Re: mbarcode
 
ZXing generates this output (http://zxing.org/w/decode):
A á
E é
I Ã*
O ó
U ú

and mBarcode generates something with similar end symbols (look at the terminal output. Ignore the fact that on some line most of the data are turned into delta characters, this seems to be caused by not using qPrintable() but instead using the stream operator to send the text to qDebug().)

So the question is really, what sort of encoding does the barcode contain? Afaiu, both libzbar and libdmtx should accept UTF-8, and it is possible to specify this at the beginning of the barcode. See this comment: http://sourceforge.net/tracker/?func...36&atid=928516

Basically it's going to take some more digging I think to work out whether the fault lies with the data (not saying what encoding it uses), the decoders (not guessing correctly or not handling the particular encoding in the data) or mBarcode (loosing the encoding along the way).

We specifically generate the QStrings that pass the data around using .fromUtf8(), so I think we should be handling it correctly. I'll see if there's a way of forcing the decoders to always assume UTF-8 in the absence of any other indicators.

fms 2010-10-20 11:49

Re: mbarcode
 
Confirming that the new mbarcode version from Extras-Devel is way more responsive now.

lardman 2010-10-20 12:07

Re: mbarcode
 
I've just pushed a very minor update to extras-devel which implements focus+scan for 5sec if you press the space button as mrsellout requested.

I've also worked out why the DBus and PythonQt plugins weren't working (my not using QDir very well) and will do some testing to see if I can get these up and running asap. Nothing in Extras-* for these, but they are sat in SVN if anyone wants to take a look.

dragly 2010-10-20 12:39

Re: mbarcode
 
I'll try to get around and fix the fps startup issue. I just haven't found the error in the code yet. I think it could be solved by checking the shutter state one more time.

About the characters, this was something I looked into earlier. The problem is that ISO-8859-something or UTF-8 is usually the encoding used for qr codes, but there is no default encoding in the specification, so everything, including UTF-8, might be used.

In other words, if there is no information about the character encoding used by the qr encoder, there is no way to know what it is. I suggest we go with assuming UTF-8, as it is most universal, unless there are any encoding hints in the code.

dragly 2010-10-20 12:41

Re: mbarcode
 
But we could of course add an user option to change the encoding in case we get it wrong. Or somehow try to "guess" the encoding, if that is at all possible?

lardman 2010-10-20 12:44

Re: mbarcode
 
Quote:

Originally Posted by dragly (Post 846033)
I'll try to get around and fix the fps startup issue. I just haven't found the error in the code yet. I think it could be solved by checking the shutter state one more time.

Ok, cool.

Quote:

Originally Posted by dragly (Post 846033)
About the characters, this was something I looked into earlier. The problem is that ISO-8859-something or UTF-8 is usually the encoding used for qr codes, but there is no default encoding in the specification, so everything, including UTF-8, might be used.

In other words, if there is no information about the character encoding used by the qr encoder, there is no way to know what it is. I suggest we go with assuming UTF-8, as it is most universal, unless there are any encoding hints in the code.

We need to do some testing with popular encoders to see what they use, but yes I'd go for UTF-8 as the default as it's the obvious choice for encoding the barcodes (let's hope it's as obvious to those who write the barcode encoders! ;))

Dragly, any thoughts on giving an indication (e.g. colour the list item) in the ResultsWindow sink list so that users know their tap has been registered?


All times are GMT. The time now is 02:34.

vBulletin® Version 3.8.8