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

SignUp Now!

Textutils request

Charles Dye,

Would you consider providing a way for @UQUOTES and WRAP to suppress replacing a double hyphen with an em dash?
Perhaps supply an environment variable which is the string that replaces the double hyphen, default to the em dash. I would set it a single hyphen for my purposes.

I'm reviewing the source and it looks like you've already got it; set a variable EMDASH to the character (not string) you want. You can specify it either as a literal character, or as a decimal or hexadecimal value.

Dunno how I managed to document the obscure ones, and miss that....
Thanks, Charles, but it doesn't work.

I just tried using
set emdash=0x002D
and it does not work. The actual emdash character 0x0097 appears in the output where two occurrences of 0x002D appear in the input.

I also tried setting EMDASH to 0x2D and a literal hyphen, and none worked.
Charmap says


Exactly what does that mean?
I downloaded the new version.

WRAP now works correctly:
~\Work> unset emdash

~\Work> echo abcde--fgh > x.tmp

~\Work> WRAP /f:2 /c:1 /P:2,2 /W:69 /Q x.tmp > y.tmp

~\Work> set emdash=0x2D

~\Work> WRAP /f:2 /c:1 /P:2,2 /W:69 /Q x.tmp > z.tmp

~\Work> type /x y.tmp
0000 0000 20 20 61 62 63 64 65 97  66 67 68 0d 0a             abcde—fgh..

~\Work> type /x z.tmp
0000 0000 20 20 61 62 63 64 65 2d  66 67 68 0d 0a             abcde-fgh..

But, @UQUOTES still fails:
~\Work> unset  emdash

~\Work> echo %@uquotes[zyxwv--uts] > y.txt

~\Work> set emdash=0x2D

~\Work> echo %@uquotes[zyxwv--uts] > z.txt

~\Work> type /x y.txt
0000 0000 7a 79 78 77 76 97 75 74  73 0d 0a                 zyxwv—uts..

~\Work> type /x z.txt
0000 0000 7a 79 78 77 76 97 75 74  73 0d 0a                 zyxwv—uts..

I'm happy, because I'm using WRAP, and @UQUOTES isn't affecting me right now.
Thanks, Charles
Last edited:
OK, I get it. (Doh!). So the emdash is 0x2014 (Unicode, AndaleMono); I can see it here. What's the 0x0097 that Dave spoke of?
OK, it's there, 0x97 in the code page. And it's supported by my font (Andale Mono). I can see it with echo "%@char[0x2014]". But "echo %@char[0x97]" gives me the unprintable symbol. Can I use the 0x97 in any way?

Similar threads