Openbravo Issue Tracking System - Retail Modules
View Issue Details
0027994Retail ModulesWeb POSpublic2014-10-27 21:432014-12-15 13:04
jecharri 
marvintm 
normalmajoralways
scheduledopen 
5
 
 
No
0027994: Web POS does not search properly with strange characters (take into account all of them) in the product name
Web POS does not search properly with strange characters (take into account all of them) in the product name
-Change a product name to Roüet

-Go to Web POS and try to find by Rouet

Verify that Web POS does not search the product.
It should work with all strange characters. For example french strange characters
No tags attached.
Issue History
2014-10-27 21:43jecharriNew Issue
2014-10-27 21:43jecharriAssigned To => marvintm
2014-10-27 21:43jecharriResolution time => 1417388400
2014-10-27 21:43jecharriTriggers an Emergency Pack => No
2014-10-27 21:50jecharriSummaryWeb POS does not search properly with strange characters in the product name => Web POS does not search properly with strange characters (take into account all of them) in the product name
2014-10-27 21:50jecharriDescription Updatedbug_revision_view_page.php?rev_id=6904#r6904
2014-10-27 21:50jecharriProposed Solution updated
2014-11-13 09:26mtaalAssigned Tomarvintm => aaroncalero
2014-11-14 14:35mario_castelloAssigned Toaaroncalero => mario_castello
2014-11-14 14:35mario_castelloStatusnew => scheduled
2014-11-14 14:35mario_castellofix_in_branch => pi
2014-11-14 18:33mtaalAssigned Tomario_castello => aaroncalero
2014-11-17 12:00mtaalNote Added: 0071696
2014-11-30 11:25mtaalAssigned Toaaroncalero => szapata
2014-12-08 16:30jecharrifix_in_branchpi =>
2014-12-15 13:04mtaalAssigned Toszapata => marvintm
2014-12-15 13:04mtaalTypedefect => design defect

Notes
(0071696)
mtaal   
2014-11-17 12:00   
Copy of email discussion:
Since WebSQL is built on top of SQLite, I've been doing some research about Unicode and SQLite.
SQLite (and therefore WebSQL) does support Unicode (all data is saved in Unicode formatting), but the querying is a bit limited. Querying ignoring accents/diacritical marks is not supported by SQLite. I've done some tests and the Chrome Dev console returns the following:
> select 'u' like 'U' => True
> select 'ü' like 'Ü' => True
> select 'u' like 'ü' => False

Proposed solutions include creating custom collations to replace the behaviour of the like() function or creating a "normalized" column to execute queries against it.
Since we can't control the implementation of WebSQL inside the Web browser, I think adding new collations would be very difficult if not impossible. Adding a new normalized column would work but this brings me back to the questions involving the character set we should support (e.g. if we should support ø, æ,...). Anyway, the downsides of creating a normalized column are:
a) We would only be supporting diacritics-free quering for the m_product table, instead of diacritics-free quering for the entire database.
b) We would need to create the normalizing function and include all the translations we'd like to support.