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

OK.
That might actually be simplest - even if it does duplicate system
functionality, it would be easier for us to code (only one API to grok,
rather than three...)

FWIW, I had a quick look and for win32 it seems there are mechanisms we
can use, but wcwidth() is not one of them...

> 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.

Indeed - though when you dig into it, "well" seems to be a relative term
- not that MK's code is bad, just that the problem is Real Hard...

> 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.

Yes - this is a tricky one.
I think it is just the range U+0080 to +009F actually, but there appear
to be a heap of web pages and docs that claim to be utf8 but have chars
from MS cp125x that use that range... The euro symbol being one such.

I even saw a recommendation (I think in the Unicode docs, maybe w3c
docs) that for the purposes of portability, web browsers and text
viewers and the like, on encountering these codes, should interpret them
as cp125x just to be on the safe side...

Now, there is an option in the fltk utf8 utility functions
(ERRORS_TO_CP1252 in fl_utf.c) to do that, and it is currently (in
fltk-1.3) ON by default.





SELEX Galileo Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

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

Reply via email to