I found (while facing this problem) two word related to input-method which are xim & uim. I know the name only: X Input Method and Universal Input Method.
I want to know What is the difference in use, functionality and working between xim and uim?
The biggest difference is that most input systems are implemented server-client-wise, uim is just a library.
Most users don't need an input method system at all or only need simple, table-based converters. Such users don't require or are unwilling to install a complex input method system, so we want to keep uim simple.
Uim is an input method module library which supports various scripts and can act as a front end for a range of input methods, including anthy, canna, prime, or skk (for japanese), pinyin (for chinese), byeoru (for korean), and m17n (for many other languages). most of its functions are implemented in scheme, so it's very simple and flexible.Source
Now what about XIM? XIM is a pretty obsolete input method protocol which both ibus and fcitx implement for legacy support reasons only. There is no real reason why you would want to use XIM nowadays over any of those two. The only reason why you would want to set GTK_IM_MODULE="xim" is to override GTK's hardcoded ComposeKey settings. Source