Stty and copy special character

Hello,

I do have a little issue here and Google doesn't give me any solution @this moment.

In HP UX Vi editor: I want to place this character: �

I copied it from internet or for example Word Special Symbols. But how do I paste it in Vi?

Many thanks in advance :slight_smile:
Sincerely,

Arjan

Can you display it in with vi? If so, can you get it into a file, all by itself? If we call this file RTM (for Registered Trade Mark), then you could open the file that you wish to insert it to and:-

  1. Please the cursor in the correct position.
  2. Insert a new-line (break the current line in the correct place)
  3. Press ESC then k once to move up a line.
  4. Type :r RTM and press ENTER
  5. Press kJxJx to join the (now) three bits of the line together again and remove the added space.

Hopefully that will do it.

Depending on your display font (mine is vt100 emulator) you might get away with this to generate your file RTM:-

echo "\0256" > RTM

This will display the character for ASCII octal value 256. An alternates you could try is character 656.

I hope that this helps.

Robin
Liverpool/Blackburn
UK

1 Like

Hello Robin,

Thanks for great solution. Could you please share with us how we can see/check ASCII table any commands for same, I will be grateful to you on same.

Thanks,
R. Singh

Do you want something to display all the characters?

If so, you can:-

#!/bin/ksh
i=0;until [ $i -ge 8 ]
do
   j=0;until [ $j -ge 8 ]
   do
      k=0;until [ $k -ge 8 ]
      do
         echo "$i$j$k=\"\0$i$j$k\""
         ((k=$k+1))
      done
      ((j=$j+1))
   done
   ((i=$i+1))
done|strings

Some implementations may prefer print to echo

If this isn't what you were after, I'm afraid I've missed intended the question. Can you elaborate?

Robin

Thanks.

You replied:

"Can you display it in with vi? If so, can you get it into a file, all by itself? If we call this file RTM (for Registered Trade Mark), then you could open the file that you wish to insert it to and:-"

But I can't display it in Vi. When i copy and past � it displays a dot (.) in Vi. So I cannot create a file named RTM.

With Regards,

Arjan

---------- Post updated at 07:59 AM ---------- Previous update was at 07:51 AM ----------

This works fine though :slight_smile:

---------- Post updated at 08:00 AM ---------- Previous update was at 07:59 AM ----------

This works fine was a answer to your script.

Great. Glad to be of help. :cool:

Robin

Sorry.. Unix.com was struggling with me.

Thanks.

You replied:

"Can you display it in with vi? If so, can you get it into a file, all by itself? If we call this file RTM (for Registered Trade Mark), then you could open the file that you wish to insert it to and:-"

But I can't display it in Vi. When i copy and past � it displays a dot (.) in Vi. So I cannot create a file named RTM.

With Regards,

Arjan

What matters is what the user sees. If you are inserting ownership comments, then probably better stick to using (R) or (TM) If the symbol you want displays okay on the screen for the users when not in vi, then be happy. :stuck_out_tongue:

Having worked on converting XES to PCL and having to read every character in so that I knew how to configure the conversion software, reading HEX is our job, not the end user's so you need to focus on what they see. I assume that they are not using vi, of course.

Robin