[racket-dev] pr 12683 and using something like text:nbsp->space?

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Thu Apr 12 17:06:12 EDT 2012

I'm not sure of the right answer, but there is also a notion of
normalization of unicode characters that probably fits into whatever
solution you come up with here (ie the thing DrRacket is doing for
normalization probably applies to what you're thinking about).


On Thu, Apr 12, 2012 at 2:47 PM, Danny Yoo <dyoo at cs.wpi.edu> wrote:
> On Thu, Apr 12, 2012 at 3:26 PM, Eli Barzilay <eli at barzilay.org> wrote:
>> A few minutes ago, Danny Yoo wrote:
>>> I want the behavior of the auto-translator to notify the text has
>>> changed, so that if the user opens a file in DrRacket with the zero
>>> width space, they can Save the file:
>> So, this happens on any editing?  What if I want to have those
>> strings?
> Let me think of some example use cases, just to make sure the
> scenarios are sensical.
>    1.  Copying and pasting program source into a buffer, where the
> clipboard has zero-width space.
>    2.  Loading an existing file whose content contains zero-width spaces.
>    3.  Manually typing in a zero-width space (is this even possible?!).
> In all three scenarios, I can see that it's possible the user really
> does want to leave zero-width characters unmolested.
> Possible actions for remediation:
>    1. Quietly and automatically translate the characters.
>    2. Bring up a dialog with the user asking whether the character
> should be translated or not.
>    3. Status quo: don't do anything.
> Maybe make these editor preference options?
> Is there another action or use case that I'm missing?  I like #1 from
> a beginner's perspective: if I'm a beginner and have no clue what a
> zero width space is, why shouldn't DrRacket just fix it for me?  From
> a power-user's perspective, I can see the argument for either #2 or
> #3.    But I'm already content with the notion that DrRacket is
> already going some text normalization, such as the DOS newline stuff
> from a month or so ago, so #1 doesn't bother me so much from a
> power-users perspective either.

Posted on the dev mailing list.