Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1388] CustomObject regex query stopped working with Hebrew

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionFixed
Resolution Date2014-08-22T15:02:48.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsDocumentation
Labelsacs,, cloud, language, query, regex
ReporterSeth Toda
AssigneeWei Kong
Created2014-08-12T17:12:12.000+0000
Updated2016-03-08T07:37:48.000+0000

Description

My mobile app (android and iphone) has CustomObject regex query that has been working perfectly for several months. We've recently found that it has a bug when used with Hebrew characters. It seems like something has been changed in the cloud service and this is why it stopped supporting Hebrew. Just to clarify, the production version worked fine until something changed several days ago, that didn't involved any code changes. My query is:
Cloud.Objects.query({
        classname: 'custom1',
        page: page_num,
        per_page: RESULTS_PER_PAGE,
        where: {
            name: {'$regex': '^'+ n}
        });
Where 'n' - is a variable of a Hebrew string. The ACS request is:
ACS Request: { url: "objects/custom1/query.json", verb: "GET", data: {"page":1,"per_page":10,"where":{"name":{"$regex":"^ט"}}} })
(In the regex is an example of a Hebrew character) The error I receive is:
400: Error: This regex query is not supported, regex expression should start with ^letter or ^digit
This query still works fine with English, but not with Hebrew.

Comments

  1. Seth Toda 2014-08-14

    The fix for this bug is ready for production and will be released today. - Seth

JSON Source