[Bf-committers] International Input

Ignacio Fernandez Moreno hellmoon666 at gmail.com
Fri Apr 23 08:25:55 CEST 2010


Hi Damien,

Those are good news, Can you add that to the patch i put before?

The two character issue has to do with the so called "dead keys" (keys that
act as modifiers to the next key pressed).

For windows i made a one line patch to prevent filling the key event with
ascii data in those cases. Maybe the same could be done in other systems.
The patch:
https://projects.blender.org/tracker/index.php?func=detail&aid=22106&group_id=9&atid=127

About the main issue, i've been researching some more and even the patch i
made works it is only a bit part of what should be changed. I mean,
everything that was a char variable as string (not as byte) should be
changed and there is a lot. I think the way to go is by coding things by
areas, step by step making the build compile, run and work in every step so
that it can be merged with trunk. So we need good plannig from someone that
has a better "big picture" of Blender than me, with those directions i think
this is a must in an application that handles text and is better to do it
now than later.

2010/4/22 Damien Plisson <damien.plisson at yahoo.fr>

>
> Le 22 avr. 2010 à 08:52, Ignacio Fernandez Moreno a écrit :
>
> > Hi all,
> >
> > I've been researching too. My aproach was trying to get input in
> utf/unicode
> > and this is what i've found:
> >
> > - Ghost gets every input as an ascci char, you can see this in
> > GHOST_TEventKeyData, and GHOST_EventKey. It should use wchar_t (from
> > wchar.h). I have a patch that does this and applies it to the rna. It
> > compiles and works giving some support to the utf input but it fails
> showing
> > it because there is format conversion in some places using RNA_string_get
> > with chars. Luckily ascii chars work well because they are the same in
> > unicode so until everything is changed this patch works in Windows. Unix
> and
> > OSX should change it's respective GHOST_System codes to set
> GHOST_EventKeys
> > with wchar_t instead of ascii but i'm not experienced with those yet.
> >
> > So i the point is changing that in the GHOST_system of other OS and
> looking
> > where the RNA_string_get /RNA_string_set functions are called in the code
> > with char arrays and change them to wchar_t arrays, as i read in a
> tutorial
> > (can't remember address) a Character will no longer be a "char" in
> Blender
> > so everyone should be aware of that.
> >
> > Maybe i have some point wrong or some code not really well implemented
> but
> > it's a start.
> >
> > I've not looked into file saving/reading so our researchs are
> complemetary i
> > think.
> >
> > The patch:
> >
> https://projects.blender.org/tracker/index.php?func=detail&aid=22112&group_id=9&atid=127
> >
> > As i said, it needs some work. Specially I need help with the
> > X11/Carbon/Cocoa part.
>
> OSX events return unicode data, and currently Ghost implementation performs
> the translation to 8bit IsoLatin1.
> So it's just one line change to get the original 16bit unicode data.
>
> Another issue is to handle the two-keys chars, like on a French keyboard: ^
> + e => ê.
>
> You can forget about carbon, it's the old Mac API that is deprecated.
>
> Damien
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>


More information about the Bf-committers mailing list