简体   繁体   中英

parse.com Does parse queries support other languages (such as chinese characters)

I am developing an ios-Application with parse.com, but it seems that the queries does not support chinese characters .

For example:

let query = PFQuery(className: "User")
query.whereKey("username", equalTo: "你好")

does not find any results even though the username is indeed in the database.

Is there a way to support query for different lanaguges? Or maybe use query.whereKey(regexMatch) ?

Another workaround i can think of is write my own javascript cloud code to support chinese query.

After playing with it I figured out the way is to use regex match:

query.whereKey("userName", matchesRegex: searchText, modifiers: "i")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM