Am 18.09.2015 um 22:03 schrieb Antonio Scuri:
>   I think that won't work. It will print garbage... Specially in Windows.

Out of curiosity: why will it print garbage?

(BTW: In the case at hand it's not Windows. As I noted: I've been able
to bypass the issue.)

The symptom was NOT exclusively seen in the printf debug output.  The
same mangled string was displayed by the IupText control.

Best

/Jörg

> 
> Best,
> Scuri
> 
> 
> On Fri, Sep 18, 2015 at 4:55 PM, "Jörg F. Wittenberger" <
> joerg.wittenber...@softeyes.net> wrote:
> 
>> Am 17.09.2015 um 02:34 schrieb Antonio Scuri:
>>>   How are you checking this? Using a printf like output?
>>
>> Exactly.  Sitting in the action callback I fed the new_value pointer to
>> printf(stderr, "SearchV: \"%s\"\n", new_value);
>>
>>
>>>
>>>   I couldn't reproduce the problem here.
>>>
>>> Best,
>>> Scuri
>>>
>>>
>>> On Thu, Aug 27, 2015 at 10:21 AM, Antonio Scuri <
>> sc...@tecgraf.puc-rio.br>
>>> wrote:
>>>
>>>>   ok I'll check that.
>>>>
>>>> Thanks,
>>>> Scuri
>>>>
>>>>
>>>> On Wed, Aug 26, 2015 at 6:22 PM, "Jörg F. Wittenberger" <
>>>> joerg.wittenber...@softeyes.net> wrote:
>>>>
>>>>> I'm trying to use the ACTION callback on a IupText.  The callback
>>>>> receives wierd values for the 3rd (char* new_value) argument.
>>>>>
>>>>> Here what I get when I enter "merkwürdig":
>>>>>
>>>>> SearchV: "m"
>>>>> SearchV: "me"
>>>>> SearchV: "mer"
>>>>> SearchV: "merk"
>>>>> SearchV: "merkw"
>>>>> SearchV: "merkwü"
>>>>> SearchV: "merkw�r�"
>>>>> SearchV: "merkwüdr"
>>>>> SearchV: "merkwürid"
>>>>> SearchV: "merkwürdgi"
>>>>>
>>>>> The "ü" character is first damaged, then restored.  Worse: from now on
>>>>> the last two characters are always kept swapped.
>>>>>
>>>>> The problem worsens to total mess when I enter two UTF-8 characters.
>>>>>
>>>>>
>>>>> I've been able to work around the problem by ignoring the ACTION
>>>>> callback and retrieving the current value in VALUECHANGED_CB.
>>>>>
>>>>> Just wanted to inform you about the issue.
>>>>>
>>>>> Best
>>>>>
>>>>> /Jörg


------------------------------------------------------------------------------
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to