Mark,

On 10/24/14 1:51 PM, Mark Thomas wrote:
> On 24/10/2014 07:28, Mark Thomas wrote:
>> On 23/10/2014 22:39, Christopher Schultz wrote:
>>> Mark and Konstantin,
>>>
>>> On 10/23/14 3:53 PM, Konstantin Kolinko wrote:
>>>> 2014-10-13 18:39 GMT+04:00  <ma...@apache.org>:
>>>>> Author: markt
>>>>> Date: Mon Oct 13 14:39:36 2014
>>>>> New Revision: 1631422
>>>>>
>>>>> URL: http://svn.apache.org/r1631422
>>>>> Log:
>>>>> Set encoding so diffs are reported correctly
>>>>>
>>>>> Modified:
>>>>>     tomcat/trunk/java/org/apache/catalina/Lifecycle.java   (props changed)
>>>>>     tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java   (props 
>>>>> changed)
>>>>>
>>>>> Propchange: tomcat/trunk/java/org/apache/catalina/Lifecycle.java
>>>>> ------------------------------------------------------------------------------
>>>>>     svn:mime-type = text/plain; charset=UTF-8
>>>>>
>>>>> Propchange: tomcat/trunk/java/org/apache/coyote/AsyncStateMachine.java
>>>>> ------------------------------------------------------------------------------
>>>>>     svn:mime-type = text/plain; charset=UTF-8
>>>>>
>>>>
>>>>
>>>> and
>>>>
>>>>> URL: http://svn.apache.org/r1631406
>>>>> Log:
>>>>> Use UTF-8 to fix ASCII art in Javadoc. How ironic.
>>>>
>>>> Personally, I do not like the idea of using UTF-8 in java source
>>>> files. That is too fragile. It does not match my OS and IDE default.
>>
>> US ASCII is likely the only option that suits every possible
>> combination. Given the ever growing use of UTF-8 as a default it seems
>> reasonable to me (my development is split between OSX and Windows with
>> most time spent on Windows).
>>
>>>> I noted that <javadoc> tasks in Tomcat 8 are configured with
>>>> encoding="ISO-8859-1".  It means that those double angle quotation
>>>> mark characters from http://svn.apache.org/r1631406 become garbage.
>>
>> We can fix that easily enough.
> 
> Done, so at least the next release will be legible. I'm open to
> alternative long term solutions. My criteria are:
> - simple to maintain
> - readable in source
> - readable in Javadoc
> 
> 
>>
>>>> I propose to use "{{" and "}}" as a replacement.
>>
>> I considered that (and single "{" and "}") and I don't think it looks right.
>>
>>> What about embedding a DOT[1] script in the Java source instead of using
>>> ASCII art?
>>
>> That might work. It depends how well the renderer (canviz maybe) handles
>> the complexities of the diagram. I spent quite a lot of time arranging
>> the diagram so it was readable.
> 
> Hmm. That isn't going to be as simple as I had hoped. At this point the
> additional hassle of a few files using UTF-8 seems a lot less than using
> DOT.

Agreed. DOT is easy to write and semi-easy to read, but the ASCII art is
a lot more readable in source files than DOT. The advantage of DOT is
that you don't have to manually re-do the layout any time you need to
add a state, a transition, or when something's name changes or you want
to add some annotation. The layout engine just re-creates the image so
everything fits.

-chris

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to