Closed greenlikeorange closed 9 years ago
@alt332
Here's my 2¢.
The API should be able to accept both inputs but with detecting and converting to one font before inserting the data into the db. Since the existing data are in Zg, should we convert the Unicode content to Zg and inserted ? ( Damn, it breaks my heart to say that. I hope this is the last time I have to say "convert Unicode to Zg" :broken_heart: )
And for website which fetches the data from API, it is not that hard to change accordingly. It can continue with existing one because font embedding is Good Enough™.
However, for the app, it's a bit tricky as it might break the existing apps if the new app tends to use Unicode.
One solution is API can be either versioned for old one and new one. The question here is the old app still should receive the updated content in the format that old app can accept. Is that possible ?
Another solution is the API to provide the converted data whenever the new app calls the API with a flag.
Let's do this quickly.
+1 to @yelinaung solution
@yelinaung I think converting before send from API is not cheap. How about convert Unicode of current data and also receiving data from old app. That might be good i thought.
@alt332 @khzaw You guys might already know this. @trhura's paytan has the font detecting and converting ready for Python.
@greenlikeorange Yup. It's never cheap but right now, I am not even worry about it because do the app has 10 millions users ? Not an issue but I am just saying.
How about convert Unicode of current data and also receiving data from old app. That might be good i thought.
I would not go for it. The old app cannot receive Unicode contents and I do not think the new app tents to use Unicode.
@yelinaung ok, so you go for convert in coming data to zawgyi ? So should the new data from web be zawgyi?
Yes. That seems the easiest, dirtiest and fastest solution to implement.
So should the new data from web be zawgyi?
It's always been Zg. Isn't it ?
Yes, it will be zawgyi.
We shall leave the decision to the @khzaw and @alt332
The data in the db would persist in unicode only. In fact, we will start pruning existing zg content in db into unicode. The clients should take the data and convert it accordingly.
That being said, if it is too much for the client to do on the fly conversion, the server could convert the content into zawgyi before serving it out via GET or saving it into it db. But data persistence will only be in unicode and unicode only.
cc @alt332
@khzaw Yayy. I love Unicode. So, the API will provide two versions of data ?
Please continue the discussion with @indexer @nyanlynnhtut @mmublackpirate @PoePoeMyintSwe since they are doing the Android app.
@alt332 API v2 က Unicode ဘဲလက်ခံတော့မှာလာ?
Ping @khzaw
Recently I added font converting middle-ware at data receiving form API. I will change all zawgyi formatted string to unicode5.1 standard.
But for form submitting, I left it as zawgyi because I not sure API accept unicode or not? If API accept both font, I will convert font-text to unicode5 before
POST
request send.