[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] DISCUSSION/VOTE: The character tower



Per Bothner writes:

> On 05/07/2014 01:26 PM, Bear wrote:
> > (string #\A #\x301) and (string #\xc1) are both expressions returning
> > a string.  Unicode canonical equivalence says they should return the
> > same string.
> 
> In which programming languages, if any, do these expression (or similar
> expressions in appropriate syntax) return the same string?
> I don't know of any.

They don't in Python. I tried in 3.2.3 (in Ubuntu) and 3.4.0 (in Red
Hat).

   >>> 'A' + '\u0301', len('A' + '\u0301')
   ('Á', 2)
   >>> 'Á', len('Á')
   ('Á', 1)

Both print as a single character but the glyphs look slightly
different to me. The string lengths differ as shown.


_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports