-
[SOLVED] Accented / ASCII characters?
Hopefully this counts as a "software" question. In Win, I'm used to being able to hit Alt-161 or Alt-168 or whatever, and have special characters appear (accented letters, upside-down questions marks, etc). I've hunted Synaptic for "accent" and "ASCII", downloaded a couple of packages, and had no success getting something similar to work.
In Win, I could even set up a second language-type for my keyboard, switchable with Alt-Shift, to achieve an á by hitting the ' key and then the a key. I see nothing similar in Ubuntu; one package that looked like it would do it was too mucky to figure out whether that was its actual purpose or not.
I know that the "Character Map" contains those characters, as does the "Insert" menu of OOo, but it's cumbersome to have to switch back and forth to the darn thing every time I want something unique. There must be a better way...
Last edited by JMiykal; 12-20-2008 at 08:20 PM.
Reason: solved
-
AHA! Either this option didn´t exist before I downloaded ¨keylaunch¨, or else I passed it by like twenty times. My keyboard setup allows me to set up an alternate layout (US-intl w/dead keys) and set ¨Alt¨ as the third-level modifier. Now, if only I could stil have Alt-Tab work... for some reason that behavior just went away...
Looks like I´m better off using the Win key for 3rd level, so that Alt works as it should.
I guess I´ll leave this on here in case anyone else has the same problem.
Last edited by JMiykal; 12-20-2008 at 08:20 PM.
-
Um, nitpicking here.
Those are specifically not ASCII characters. You're most likely thinking of ISO8859-1 characters based on your description, but they're also part of Unicode, so they'll work with software that understands UTF-8.
ASCII only has 128 characters in it (0-127); it is only 7 bits wide. (But most machines have 8-bit bytes, so the uppermost bit is always zero.) ISO8859-1 has 256 characters (8 bits wide). But the character referred to by a given byte (whose high bit is one) in ISO8859-1 will not have the same byte representation in (say) UTF-8; the two are not compatible. (UTF-8 and ASCII are compatible: any character in ASCII, if interpreted as a UTF-8 byte, will be the same character.)
Now, the whole reason any of this matters is that you were talking about holding down alt and using the numeric keypad. The numbers you type in when doing that are the decimal values of ISO8859-1 bytes (IIRC anyway; they might be UTF-16, which is compatible that far). But almost everything in Linux is UTF-8 now, not any of the legacy single-byte encodings (all of them are too small) or UTF-16 (wastes a lot of bits for most European-language text).
Anyway, yes, a keyboard layout with dead keys is the accepted way to do this, because there's another whole set of translations that turn keyboard inputs into X keysyms, and then another whole set of translations that turn those into actual characters in the program -- and allowing some special input method that sends individual numeric values would break if any of these translation layers changed.
Of course, you may still be able to use echo to add individual byte values to a file, if that file is actually a text file (and not some crazy xml or compressed xml thing, like OO or abiword or most other word processing programs). You can always use a hex editor as well. But most of the time you don't want to do that: you just want to add an accented character; dead keys are the best way to accomplish this.
-
Sorry, my calling them "ASCII" characters is an artifact of years-old Windows use; I could find the Alt-combos by Googling the words "ASCII" and "keypad" or something like that. My bad, and thanks for the explanation; makes sense.
-
So basically the easy way is to set your keyboard ( I am assuming that you are using a US keyboard layout) you can in KDE enable Us international layout with dead keys, that is what I use, because I type in English, French and Afrikaans of which two of those languages require accents.
Feel free to PM me for help
Using PCLinuxos 2007 on my laptop and 2009 on my Desktop and proud of it!
Desktop:
AMD Phenom II x2 545 3GB DDR2 RAM 500GB SATA,250GB SATA, 250GB IDE, ATI Radeon HD 4870 512 DDR3
Laptop:
Intel Core 2 Duo T7500 (2.2) 2GB RAM, 160GB Sata HDD, nVidia 8600GM 512MB
Please come back and tell us if your problem is solved, it may help others, and stop us from wondering what happened.
-
The placing of the dead keys on the International English layout is not always very convenient, and it's worth getting to know the Compose key. You can designate one of the Windows keys or the Windows menu key as Compose, using the System-Preferences-Hardware-Keyboard section of the Gnome menu. The details are explained in Wikipedia, but you can use key sequences like
<Compose><'><a> for á
<Compose><,><c> for ç
<Compose><o><e> for œ
<Compose><;><a> for ą
-
OldAstrologer, thanks for the tip...that works quite well for accented characters like ó and even ñ. However, do you know how to make the upside down question/exclamation marks using the compose key?
"The author of that poem is either Homer or, if not Homer, somebody else of the same name."
-
Sorry I haven't been around, gambloro1. The answer is to press the question/exclamation key twice after compose.
You can find a list of sequences in a file called (yes!) Compose. On my system, it's in /usr/share/X11/locale/en_US.UTF-8/, but you can search for it if it's not there on yours. The file can be edited, and I believe a ~/.Compose file will override it. The list on Wikipedia is for Solaris, if I remember correctly, but it's much the same.
-
¿Hit the key twice eh? ¡It works perfectly...thanks!
"The author of that poem is either Homer or, if not Homer, somebody else of the same name."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|