Scott Meyers wrote:
> John W. Kennedy wrote:
> The same is largely true of the "no-width no break" solution, except
> that that approach is more amenable to global search and replace, I think.
>
> The real problem here is that my definition of a word seems to be
> different from OO's (my definition includes "+" signs, not to mention
> underbars), and, as far as I know, there is no way to tell OO which
> characters make up a word.

See Unicode Standard Annex 14: Line-Breaking properties at
http://www.unicode.org/reports/tr14/ . See also Unicode Standard Annex
29: Text Boundaries at Unicode Standard Annex #29
Text Boundaries at http://unicode.org/reports/tr29/ . I think this is
what OO is using and also what it should be using. That is, if someone
thinks that OO is not operating in accord with this and other Unicode
Standard Annexes, then they have a case which they can put in the issue
tracker. Otherwise not.

See also Standard Annex 31 Identifier and Pattern Syntax at
http://www.unicode.org/reports/tr31/ for some discussion of computer
languages.

Note that line-breaking rules are very complex, especially when one is
trying to establish general rules for all the languages and scripts in
the world.

I wouldn’t expect computer languages to always fit.

However, at least on my system, the following works. With CTL on, type
c, insert the no-width no-break mark, type +, insert the no-width
no-break mark, type +. Copy this into your buffer. Select Tools ->
AutoCorrect ->  Make sure the language your normally use is selected in
the box in the upper right-hand corner. Then type c++ in the Replace box
and paste the contents of your copy-buffer into the With box. Now, every
time you type “c++" it will be changed to the form with the no-width
no-break marks. Wrapping will now be correct.

Note that you can then turn CTL off now if you want. As far as I can
tell having CTL on adds some menu items but otherwise makes no changes
whatsoever in how OO handles text, so there is no reason to ever turn it
off if you ever use those menu items, which are indeed sometimes useful
for English usage.

The flaw is that Searching for c++ will now not work as expected, will
not find the forms with no-width no-break marks if you just type c++
into the Find box. If you paste a form from the text, then it will work.

Now Unicode expects that formatting characters such as the no-width
no-break mark should be ignored in searches. OO does not do so.

This is the flaw that should be fixed, I think.

Jim Allan







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to