bug-guile-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-guile-ncurses] Unicode in form-driver


From: Mike Gran
Subject: Re: [Bug-guile-ncurses] Unicode in form-driver
Date: Fri, 10 Oct 2014 16:03:03 +0000 (UTC)

Sorry.  That was a long shot.

I uploaded to the Git repo an update to guile-ncurses
that will use the Unicode-enabled version of form-driver if
the underlying ncurses supports it.  I tried with Polish characters;
it works for me.  You need to build it on a version of ncurses
from the last few months, however.

I'll make a new release soon.
 
 
> On Friday, October 10, 2014 8:53 AM, Konrad Makowski <address@hidden> wrote:
> > Well, that doesn't work. I wrote something like that, and got only 
> "??" 
> instead of "?" when i write "ó".
> 
> (map (lambda (i) (form-driver my-form  (integer->char i)))
>                      (bytevector->u8-list (string->utf8 (string c))))
> 
> -- 
> Konrad
> 
> 
> 
> W dniu 09.10.2014 o 00:10, Mike Gran pisze:
>>  I haven't tried it, but, you could try
>> 
>>  (map integer->char
>>        (bytevector->u8-list (string->utf8 (string ch))))
>> 
>>  to convert a Unicode character to a list of bytes,
>>  and then feed each byte to form-driver.
>> 
>>  But I can't test that today.  Maybe tomorrow.
>>                             
>> 
>>>  On Wednesday, October 8, 2014 1:52 PM, Konrad Makowski 
> <address@hidden> wrote:
>>>>  Could you write me some example of second option (with UTF-8)?
>>>  -- 
>>>  Konrad
>>> 
>>> 
>>> 
>>>  W dniu 08.10.2014 o 23:48, Mike Gran pisze:
>>>>    Konrad-
>>>> 
>>>>    I guess you're using UTF-8 and not ISO-8859-2.
>>>> 
>>>>    Support for characters with codepoints greater than U+00FF
>>>>    is not available for form-driver because of limitations
>>>>    in the upstream ncurses form library.
>>>> 
>>>>    A function was added this year into the upstream ncurses
>>>>    form library that handles codepoints greater than U+00FF.
>>>>    The "form_driver_w" function.  I haven't wrapped 
> that
>>>  function
>>>>    into guile-ncurses yet.
>>>> 
>>>>    For now, your options are
>>>>    1. use ISO-8859-2
>>>>    2. convert your character to set of UTF-8 bytes,
>>>>        and feed each byte one-by-one into form-driver.
>>>> 
>>>>    I'll go ahead and add the new "form_driver_w" 
> function
>>>>    to guile-ncurses this week.  But this will only work
>>>>    with a version of NCurses from this year.
>>>> 
>>>>    Thanks,
>>>> 
>>>>    Mike Gran
>>>> 
>>>>     
>>>>     
>>>>>    On Wednesday, October 8, 2014 1:06 PM, Konrad Makowski
>>>  <address@hidden> wrote:
>>>>>>    I'm using guile-2.0.9, yes i called (setlocale LC_ALL
>>>  "") and yes
>>>>>    i
>>>>>    built --with-ncursesw flag.
>>>>>    In other part my app polish characters display correct.
>>>>> 
>>>>>    --
>>>>>    Konrad
>>>>> 
>>>>> 
>>>>> 
>>>>>    W dniu 08.10.2014 o 23:02, Mike Gran pisze:
>>>>>>      Hi-
>>>>>> 
>>>>>>      Three questions.
>>>>>> 
>>>>>>      Are you using guile-1.8 or guile-2.0 or the git 
> version?
>>>>>> 
>>>>>>      Did you call (setlocale LC_ALL "") at the top 
> of your
>>>  program?
>>>>>>      When you built guile-ncurses,
>>>>>>      did you call ./configure with the --with-ncursesw flag 
> so that it
>>>>>>      is built with the Unicode-enabled version of ncurses 
> forms?
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>>      Thanks,
>>>>>> 
>>>>>>      Mike
>>>>>> 
>>>>>>>      On Wednesday, October 8, 2014 12:29 PM, Konrad 
> Makowski
>>>>>    <address@hidden> wrote:
>>>>>>>>      Hello i try to write application with 
> guile-ncurses and
>>>  stuck.
>>>>>>>      When i do something like that (form-driver my-form 
> ch) and
>>>  type some
>>>>>>>      polish letter ie. "ł" or "ó"
>>>>>>>      in form window apears ??.
>>>>>>> 
>>>>>>>      How can i avoid this issue?
>>>>>>> 
>>>>>>>      --
>>>>>>>      Konrad
>>>>>>> 
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]