[e-lang] Causeway JSON format doc?

David-Sarah Hopwood david.hopwood at industrial-designers.co.uk
Fri Aug 1 21:09:33 CDT 2008


Kevin Reid wrote:
> On Aug 1, 2008, at 18:17, Tyler Close wrote:
>> The only goal here is to be able to tell an IDE what part of the code
>> to highlight when an event is selected. Are there any dominant
>> assumptions among IDEs for how a code span is defined?
> 
> I don't know. I would *expect* to find that, if they support Unicode  
> enough that this distinction exists, they would count columns in terms  
> of grapheme clusters, since that's what the cursor will move over and,  
> insofar as monospace is possible, what fits in one monospaced column.

Visual Studio counts both encoded characters and combining sequences,
and displays both counts in the status bar. For example if I step over
'é' expressed as a combining sequence, the 'Col' counter increases by 1
and the 'Ch' counter by 2. I hadn't noticed this feature before, but
it's definitely the Right Thing; I'm quite impressed.

(VS doesn't seem to correctly handle more complicated cases involving
zero-width characters, e.g. U+200D ZERO WIDTH JOINER, but you can't
have everything.)

-- 
David-Sarah Hopwood




More information about the e-lang mailing list