me:
>> In http://www.fltk.org/str.php?L2158 I already raised the question
>> about native wcwidth() implementations and Markus Kuhn's mk_wcwidth().


Ian:
> Yup - been following that.
>
> I guess we would need a configure check to see if the system provides
> wcwidth() and wcswidth() and use them if available, or revert to the
> mk_* variants (e.g. by an ifdef or etc.) of they are not available?
>
> Is that what you had in mind? Or just to always use the built-in mk_*
> variants?


No. I wasn't intending to do a configure check. Just use mk_wcwidth().

Up until I implemented the exploratory hack in STR-2158, I had just
assumed that we would use Markus Kuhn's mk_wcwidth() regardless. It was
only when debugging further that I wondered what the native wcwidth()
would offer. I think my home box has en_US.UTF-8 set as locale and the
two routines certainly give different results. TODO: check locale!

I threw out the question about native OSX and Win32 wcwidth() behaviour
because I have no idea whether it was available, or whether there was
another preferred way to get this info on these systems. Up until now
nobody has replied to say that we really need to do x, y and z on OSX
and Win32 to achieve the same results.

Therefore I was going to continue with the Markus Kuhn mk_wcwidth()
approach. It has no system or locale dependencies, it's just a table
lookup, and so it should apply equally well across all platforms.

But, mk_wcwidth() uses the proper ISO definition for certain control
and compose characters, whereas I think both you and Albrecht have
said that the U+0080 to U+00FF control characters are often mapped to
Windows-1282 code page equivalents (e.g. euro currency character?),
so there's the potential for confusion when cutting and pasting.

I've babbled on a bit now, which wasn't my intention at all. Apologies.

This should all have stayed with the discussion of STR-2158, but I
wanted to confirm the potential difficulties with rectangular selection
in FL_Text_Display now that semi-handles UTF-8 and Unicode characters.

D.
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to