Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

For your amusement: Wrap filter

Charles Dye

Super Moderator
May
5,098
133
Staff member
I'm uploading a copy of my word-wrap utility in case it's useful to anyone. This gizmo will word-wrap text to fit a specified number of columns. It's designed for use with English prose, and may give weird or undesired results when used for source code, program output, HTML, or whatnot.

This filter has a number of features which I haven't seen in similar utilities. It can handle either unwrapped input text (EOL characters only at the end of paragraphs) or pre-wrapped text (EOLs used to enforce some other, undesired width.) It can break after hyphens as well as at spaces; it recognizes soft hyphens and handles them appropriately. It accepts OEM, UTF-16, and (not well tested) UTF-8. It can condense repeated spaces and indent paragraphs. It includes a few other trivial text-prettification features.

unm.edu/~cdye/dl/wrap.zip
 
I'm uploading a copy of my word-wrap utility in case it's useful to anyone. This gizmo will word-wrap text to fit a specified number of columns. It's designed for use with English prose, and may give weird or undesired results when used for source code, program output, HTML, or whatnot.

Thanks!

However... I just unzipped and ran it, and got this error message:

"This application has failed to start because MSVCR100.dll was not found. Re-installing the application may fix this problem."

While we're at it... this remind me of the paragraph() methods I wrote some time ago for my Java utilities, but yours utility seems much better. The one thing I'd add from my solution would be options to format the output left-aligned, right-aligned, centered, and justified.
 
However... I just unzipped and ran it, and got this error message:

"This application has failed to start because MSVCR100.dll was not found. Re-installing the application may fix this problem."

I've uploaded up a statically-linked version; try that and let me know.

While we're at it... this remind me of the paragraph() methods I wrote some time ago for my Java utilities, but yours utility seems much better. The one thing I'd add from my solution would be options to format the output left-aligned, right-aligned, centered, and justified.
Well, there is an undocumented /J....
 
Thanks for that -- I'd never heard of it. Looks much more polished than mine....
 
Thanks for that -- I'd never heard of it. Looks much more polished than mine....
But your documentation is WAY more readable than par's.
I've used par for years and I still havent's figured out how to make make it preserve bullets in a sensible way.

I like the way wrap.exe handles soft hyphens. I get those characters when I cut and paste some web pages. Thanks!
 
Back
Top
[FOX] Ultimate Translator
Translate