[Haskell-i18n] Unicode in source

Dylan Thurston dpt@math.harvard.edu
Fri, 23 Aug 2002 10:56:43 -0400


--2oS5YaxWCcQjTEyO
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Aug 23, 2002 at 08:59:36AM +0200, Ketil Z. Malde wrote:
> Ashley Yakeley <ashley@semantic.org> writes:
>=20
> > At 2002-08-21 03:42, Sven Moritz Hallberg wrote:
>=20
> >> variable-width characters:
> >> Unicode specifically doesn't say anything about the glyph representati=
on
> >> of the characters.
>=20
> > Some characters are considered "half-width", see UTR #11.
>=20
> What a mess!
>=20
> I think at this point I'll suggest that the indentation column is
> defined as the number of Chars, and to hell with character widths --
> if you need to have Chinese identifiers, then use an editor which
> understands layout properly.

I don't recommend using Unicode's notion of half-width/full-width; for
one thing, there are some very odd choices due to historical brokenness;
e.g., some greek letters are full-width.

But I also really don't recommend using the number of Chars as any sort
of measure of the width.  That can be extremely misleading.

In fact, I'd recommend redoing the layout rule in a more robust way so
that it will also work with, e.g., proportional fonts.  Requiring a
new-line before a target column is set would work.

(I'd go further and require that the leading white-space always be
identical, not just get you to the same column.  Tabs are not always
equal to 8 spaces...)

Best,
	Dylan Thurston

--2oS5YaxWCcQjTEyO
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9Zk0rVeybfhaa3tcRAgKiAJ0WBZcrJKO8SActXPIsl1pDcPKY0wCdHYcM
KUF71Q4mhyY0Iwcw5Wkjsss=
=ojk8
-----END PGP SIGNATURE-----

--2oS5YaxWCcQjTEyO--