Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: HOWTO: Special Characters made easier

  1. #11
    Join Date
    Apr 2006
    Beans
    Hidden!
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: vi problems with Special Characters

    I don't know, maybe your vi is old? Are you using vi or vim? Works for me no problem in vim. I didn't try vi.

    vim > vi anyway.

  2. #12
    Join Date
    Jun 2005
    Beans
    77

    Re: HOWTO: Special Characters made easier

    `vi` and `vim` are the same on Ubuntu. I'm using Dapper 6.06. My version of `vim` is 6.4, 2005-10. Is your version newer?

    Here's the odd behavior I get with `vim`:

    insert-mode - I type:

    <right-alt-e>'xxx<tab><right-alt-i>'yyy


    displayed on screen - notice extra <spaces>:

    <accented-e><space>xxx<tab><accented-i><space>yyy


    However, after I <ctl-L> to redraw the screen, the <spaces> disappear from view!:

    <accented-e>xxx<tab><accented-i>yyy


    If I am in command-mode, and move backward and forward with "w" and "b", the cursor moves around as if the <spaces> are still there, and treats the (invisible) <space> as if it's a separate word. I tried copying the letters from Character Map and the same thing happens with the extra spaces.

    I tried this on an Ubuntu Edgy box - same thing. Nobody else getting anything like this with `vim`??

    I also tried entering the accented letters with Open Office, and this appears to work fine without any of the above issues. This therefore seems like a vim-specific problem.

  3. #13
    Join Date
    Apr 2006
    Beans
    Hidden!
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Special Characters made easier

    vim - 7.0.164

    xxx yyy

    Feisty.

    No spaces, everything works.

    Upgrade vim.

  4. #14
    Join Date
    Jun 2005
    Beans
    77

    Exclamation Re: HOWTO: Special Characters made easier

    Ah, I found the problem - it's the setting of the LC_TYPE environment variable. Type `locale` at the command line to see the various values for your environment.

    For anyone reading this in the future, you must set it to a type that is not incompatible with accented characters. The incompatible types include "C" and "POSIX". (To replicate the odd behavior I described previously, set LC_CTYPE or LC_ALL to one of these.)

    The tricky part is that if you set LC_ALL to a value, it also sets LC_CTYPE (and a bunch of other subordinate environment variables) to that value. And in order to set LC_CTYPE to a value, LC_ALL must *first* be set to a NULL value in order to reset LC_CTYPE. If LC_ALL is set to a non-NULL value and you try to set LC_CTYPE to something, LC_CTYPE (and other subordinate variables) won't take the new value.

    I did this in my .bashrc file by doing the following (you could also do this on the command line):

    export LC_ALL=
    export LC_CTYPE=en_IN


    Note that execution order is important. If you set LC_ALL=POSIX after the above lines, it will override the LC_CTYPE value. So, if you want to use LC_ALL to set a bunch of subordinate values, first do that, then set LC_ALL to a NULL value, then set your individual LC_* values - in this example, LC_CTYPE - to whatever individual values you wish to set.

    HTH.
    Last edited by cosmolee; May 18th, 2007 at 07:43 PM.

  5. #15
    Join Date
    Apr 2007
    Beans
    38

    Re: HOWTO: Special Characters made easier

    Quote Originally Posted by userundefine View Post
    H, great hwt ! I'm on a US English keyboard and frequently have to type in French, so this makes it SO much easier. I had to find this thread with the search tool, so I hope more can see this so I'm bumping it to the top!
    I don't want to hijack this thread, but if you simply want to type in French, there's an easier way.

    See: http://ubuntuguide.org/wiki/Ubuntu:F...ded_characters

    This gives you in 2 simple keystrokes (accent + character). takes 3 keystrokes: shift,+u

    You also get these:

  6. #16
    Join Date
    Apr 2006
    Beans
    Hidden!
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: HOWTO: Special Characters made easier

    Quote Originally Posted by oldHat View Post
    I don't want to hijack this thread, but if you simply want to type in French, there's an easier way.

    See: http://ubuntuguide.org/wiki/Ubuntu:F...ded_characters

    This gives you in 2 simple keystrokes (accent + character). takes 3 keystrokes: shift,+u

    You also get these:
    Hey, nice tip ! Thank you.

  7. #17
    Join Date
    Nov 2005
    Location
    metro Philadelphia, PA, U
    Beans
    53
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: HOWTO: Special Characters made easier

    This was written for Edgy, but it probably works in other releases too.
    This should work not only in all Ubuntu releases, but in all Linux distributions as well. See this blog post.
    Linuxthe choice of a GNU generation

  8. #18
    Join Date
    Jul 2007
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: Special Characters made easier

    Thanks Jem7v,

    That was simple, I was looking at all kinds of things and your was the quickest!

    Thanks.

  9. #19
    Join Date
    Feb 2009
    Location
    On Earth
    Beans
    23
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Talking Re: HOWTO: Special Characters made easier

    Quote Originally Posted by jem7v View Post
    This was written for Edgy, but it probably works in other releases too.

    Back in Dapper Drake, you could press CTRL+SHIFT and then the unicode for special characters so you didn't have to copy and paste them from the Character palette every time you wanted to use them. This stopped working in Edgy, which greatly reduced my ability to type in Spanish. The Spanish keyboard layout doesn't contain any letters with accents except , so it didn't help much.

    Then I found the magic solution! A handy little tool called the COMPOSE KEY.

    Go to System -> Preferences -> Keyboard, then go to the Layout Options tab. There are several headings here, and the important one that says Compose Key Position. Choose a key you don't use for much, and set it as your Compose key! (I use my right WINDOWS key)

    To use it, hold the Compose key down and then type in the characters you want to mash together. For example, you can make an by typing <compose>+n+~, or by typing <compose>+e+`, or by typing <compose>+s+s and voila your letters appear.



    Maybe there was already a howto about this, or maybe lots of people already know this - but I looked for an answer to this problem for a long time and I didn't find one. I heard ABOUT compose keys in other operating systems (like OSX) but didn't figure it out until I was looking for a different keyboard setting. I hope at least Some people can find this helpful.
    Thanks!!
    After installing Language support for French I was still not able to type the characters. Setting up the 'compose' key solved my problem.

  10. #20
    Join Date
    Nov 2008
    Beans
    16

    Re: HOWTO: Special Characters made easier

    Character palette set up using character map turns out to be best for me: occasional use of arrows, greek letters, mathematical symbols & the like.

    Thanks for that!

    I guess the faster options (keyboard shortcuts) are useful for those with frequent requirements, eg accented letters, etc

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •