
hi, this is a follow up of another thread. Attached to this message there is a new version of the XPrompt with i18n support. Actually, IXPrompt.hs is what XPrompt will look like, but first I need to fix the FIXME stuff, which requires importing the XwcLookupString function. Otherwise I need to use toLocale to translate the string I receive with XLookupString. The Xwc* family function are already part of x11-extras. Only the lookupString function is missing, and it requires, I think - still I didn't look it closely -, a Storable instance. When I'll have that function imported XPrompt will be encoding independent and I will be able to have only the IShellPrompt, which is fully i18n aware, requiring the locale C stuff that is presently in IXPromptLib.hsc. The goal is to have a default, not i18n, prompt without any external dependency, and specific prompts i18n aware which will require calling setlocale() and the related C stuff. Hope to finish this stuff before x11-extras-0.4 will be released, otherwise we will have to wait the post 0.4 cycle. Andrea

On Fri, Oct 05, 2007 at 02:51:17PM +0200, Andrea Rossato wrote:
hi,
Hi, attached you'll find a new IShellPrompt.hs, since the one I've sent has a (small) bug: basically toLocale was called but not used.
When I'll have that function imported XPrompt will be encoding independent and I will be able to have only the IShellPrompt, which is fully i18n aware, requiring the locale C stuff that is presently in IXPromptLib.hsc.
Actually I'm coming to think I'm totally wrong here. XwcLookupString requires calling setlocale, and so, having this function, is not going to change anything. In order to have an internationalized prompt we need to call setlocale, no matter what. I need to investigate the problem a bit more and possibly find a cleaner solution. If someone has some hints, ideas or something else to share, please let me know. Andrea

On Fri, Oct 05, 2007 at 02:51:17PM +0200, Andrea Rossato wrote: I forgot the attachment...;)
participants (1)
-
Andrea Rossato