MyanmarAPI/faq-endpoint

FAQ Search Keyword param accepts only Unicode

Closed this issue · 4 comments

Hi,

I've tried out for some time and saw that the param q must be in Unicode to get correct search results. API Docs didn't mention about this BTW. It should have. But thinking that the user might be typing with Zawgyi in the app's text field, there'll always be no results. The user won't get what he's looking for.

It'd be cool if the API automatically detects the param q whether it's Unicode or Zawgyi, and do the search thing.

Or,

The less cooler way is to operate with Zawgyi if the request include font=zawgyi param. Because we can assume the user might be inserting Zawgyi if he asks for Zawgyi result.

Or,

Mention about this in API Docs and tell developers to convert user-inserted Zawgyi to Unicode first to send the request.

Thanks! You guys rock! ;)

Hi @phyominthu you also rock dude. Thanks for a lot of contribution on this.

Anyway FAQ data still not final. And also all data we store in unicode.

Let me ask @nyanlynnhtut about auto detect on params. Is it possible? So if we detect params in zawgyi then we convert it to unicode and then do the search. if not, then like @phyominthu suggest if dev set font=zawgyi then we consider it works with zawgyi parameter too.

@tyohan I think, font detecting have a problem. (Ref). I am suggest font=zawgyi request parameter for now.
Cc: @phyominthu

@nyanlynnhtut So when font=zawgyi is included, the API will convert q param to Unicode, do the search, and return the result in Zawgyi. Right?

@phyominthu Yes. If we found request param has font param key and param value is zawgyi, we will convert value of param q to unicode and response with zawgyi format.
Cc: @DragonVirus @ThetPaing @tyohan