Friday, August 20, 2010

gedit: Segmentation fault

Do not worry. If you get this error:
Gtk-Message: Failed to load module "atk-bridge": libatk-bridge.so: cannot open shared object file: No such file or directory
Gtk-Message: Failed to load module "gail-gnome": libgail-gnome.so: cannot open shared object file: No such file or directory

** (gedit:2133): WARNING **: Private typelib 'Gedit-3.0' not found
Segmentation fault
This was only happening briefly between updates of fedora rawhide. The problem occurred when I was using gedit 1:2.31.5-1.fc14 and kernel 2.6.34-20.fc14.i686.PAE. It looks like it is a hiccup with the new switch from gtk2 to gtk3.

After simply running yum update, now gedit 2:2.30.2-2.fc14 is installed. And it is working fine.

Monday, August 16, 2010

Unicode Normalization Forms: Interesting issue with Google Translation services and APIs

Drawing on my limited knowledge of the ocean of information which is the mashup of the basic multilingual plane (BMP) and Google AJAX Language API, it looks like the Gtranslate callbacks return inconsistent portions of the BMP for Vietnamese.

For example "Hello girl" vs. "Hello grandma" translated into Vietnamese ...
0000000 042 103 150 141 315 200 157 040 143 303 264 042 012
" C h a 315 200 o c 303 264 " \n
0000015

0000000 042 130 151 156 040 143 150 303 240 157 040 142 303 240 042 012
" X i n c h 303 240 o b 303 240 " \n
0000020
At first glance, it looks to me like the first one comes back as NFKD and the second one comes back as NFC. It is great that the translator is more polite with Grandma, hence the extra word of deference "Xin", but that is not the difference I am noting here. But rather it is the "à" in the word "chào" that comes back two different ways.

Maybe there is some option somewhere in Google's APIs that allows you to specify the range of unicode characters you want to work from when translating. If anyone knows this, please comment.

Note: Here are two command lines I used to test this:
$ wget -O - "http://www.google.com/uds/Gtranslate?callback=google.language.callbacks.id101&context=22&q=Hello%20girl&langpair=en%7Cvi&key=notsupplied&v=1.0" 2>>/dev/null | cut -d: -f2 | cut -d"}" -f1 | od -bc

$ wget -O - "http://www.google.com/uds/Gtranslate?callback=google.language.callbacks.id101&context=22&q=Hello%20grandma&langpair=en%7Cvi&key=notsupplied&v=1.0" 2>>/dev/null | cut -d: -f2 | cut -d"}" -f1 | od -bc
It looks like this issue is happening in IE7, Firefox, and Android browsers as of this post, but it is not happening on the BlackBerry browser here on my Bold 9700. Looks like the BlackBerry OS is still backward compatible with decomposed forms as well as NFC now. I wonder how it works on the iPhone, but I will not lose any sleep over not knowing.

Monday, August 02, 2010

Dictionary - Từ điển

Chắc nhiều người biết một trang web tiện dụng cho dịch một ngôn ngữ, nhưng tôi quyết định tạo ra cái này đặc biệt cho các trình duyệt web di động được cho người nào chóng dịch một vài từ nhanh hoặc từ tiếng Anh sang tiếng Việt hoặc tiếng Việt sang tiếng Anh bằng Google Translate. Xin vui lòng với.

Many folks probably have a handy page for translating some language, but I decided to create this one specifically for mobile browsers to allow folks to quickly translate a few words from either English to Vietnamese or Vietnamese to English using Google Translate. Enjoy.

This one is one for Vietnamese:
http://lightcloud.verns.net/mobile/vi/index.html

Here is one for Spanish also:
http://lightcloud.verns.net/mobile/es/index.html