[AC-1388] CustomObject regex query stopped working with Hebrew
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2014-08-22T15:02:48.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Documentation |
Labels | acs,, cloud, language, query, regex |
Reporter | Seth Toda |
Assignee | Wei Kong |
Created | 2014-08-12T17:12:12.000+0000 |
Updated | 2016-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.
The fix for this bug is ready for production and will be released today. - Seth