View Single Post
Posts: 1,048 | Thanked: 979 times | Joined on Mar 2008 @ SF Bay Area
#27
Originally Posted by rmerren View Post
I just posted an update...should show up in the repo soon. I fixed the problem with international characters (accented, umlauted, tildefied, etc.) disappearing.

For those that are actually interested in the technical parts (and in case someone searches for this very problem) here are the details:

the facebook graph api allows you to submit status updates (or other feed info) as post data in an HTML request. I was submitting the raw request string, which works great for gringo-speak. But when people whose languages were not simplified by the rough journey across the atlantic ocean tried to use characters with accent marks, these marks would disappear.

The solution was to "percent encode" the string before placing it in the post data. This was done in Qt with the following:
Code:
QString encodedStatus(QUrl::toPercentEncoding(status,"",""));
Where status is the plaintext and the resulting encodedStatus is the encoded value to include in the post data.
Thanks - not just for the update (those enhancements are good, but not used by me), but also for the code pro-tip.
I used to URL encode and then pull out the relevant parameters. Your method is more elegant.
__________________
qgvdial: Google Voice client. All downloads
qgvtp: Phone integration for the n900 that dials out and sends texts using qgvdial.
mosquitto: message broker that implements the MQ Telemetry Transport protocol version 3.
qgvnotify: Google voice and contacts notifier for diablo and maemo.

If you want to thank me, click the Thanks button.
If you'd like to thank my applications, vote to move them to extras.