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

I now think it was maybe in the w3c docs - I think its in the html5 spec
actually.


> To start with, I'm just looking at handling the ISO definitions, as
> is, and will add warnings to the documentation. Then I'll look at
> this extra mapping. After that we probably need an RFC to discuss it.

OK.
Looking at mk_wcwidth() it looks like the mod is pretty easy...

If we have ERRORS_TO_CP1252 set, then (near line 180 of wcwidth.c) we
see:

  /* test for 8-bit control characters */
  if (ucs == 0)
    return 0;
  if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0))
    return -1;


Which I guess could become:


  /* test for 8-bit control characters */
  if (ucs == 0)
    return 0;
#ifdef ERRORS_TO_CP1252
  if ((ucs < 32) || (ucs == 0x7f)) /* C0 and DEL */
    return -1;
  /* look for chars from CP1252 here - all of these are 1 cell wide */
  if ((ucs >= 0x80) && (ucs < 0xa0)) /* assume CP1252 - not strictly
valid... */
    return 1;
#else /* do the default ISO behaviour */
  if ((ucs < 32) || ((ucs >= 0x7f) && (ucs < 0xa0)))
    return -1;
#endif

-- 
Ian


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