Thread: Problem using " and '

  1. #1
    Day Dreamer
    Join Date
    Apr 2007
    Posts
    45

    Problem using " and '

    Hi,
    If this is completely out of contest, the moderators may delete it without warnings.

    I have facing this strange problem. I have a Dell Inspiron 1520 laptop and I use Fedora Core 8 via VMWare on it.
    The problem is that when I try to write any code I am unable to use the " and ' characters through the keyboard.
    All other keys seem to be working fine but when I press the afore mentioned key, nothing appears and on pressing it twice a weird replica of the ' or " characters appear which seem to be slant and unrecognized by all compilers and interpreters of course.
    Has anybody faced this problem? If so, please suggest a solution.
    The Keyboard settings are fine.
    I would love to change the world but they dont give me the source code!

  2. #2
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    The Keyboard settings are fine.
    the settings must not be fine. if you are only having this problem in your editor, then the program has a bug. i imagine this is happening in any console or window you type in, though.

    i had an issue where keys were processed incorrectly in slackware, a few years ago. check your localization settings for your keyboard. make sure you have the correct country and setup selected.

  3. #3
    Day Dreamer
    Join Date
    Apr 2007
    Posts
    45
    I have checked the Keyboard settings and I have my region set to India and have the keyboard set to Dell Inspiron Laptop (yeah I was pleased to see that option).
    I would love to change the world but they dont give me the source code!

  4. #4
    Registered User
    Join Date
    Oct 2006
    Location
    Canada
    Posts
    1,243
    I live in canada, but i think i had to set mine to US keyboard. so just fool around with those kinds of settings, because if the keyboard acts like this in all windows then thats the problem.

  5. #5
    Day Dreamer
    Join Date
    Apr 2007
    Posts
    45
    Fixed!
    Yeah sorry I was an idiot not to look at the correct settings for the Keyboard.
    Mine was set to English (International) however, we use the Engslish (USA) settings in India and that's what worked!
    I would love to change the world but they dont give me the source code!

  6. #6
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    This happens to me too. Under Windows Vista, in some programs, pressing " or ' or / or . or , or any special character, really, doesn't always work. You get characters with accents and ae characters and all sorts of weird stuff. You can fix it by pressing control and shift a few times -- make sure you use the control and shift that are on opposite sides of the keyboard. In other words, press LSHIFT-RCTRL and then RSHIFT-CTRL a few times until everything works.

    Incidentally, pressing those same key combinations in Internet Explorer 6 causes the text to read from left to right or right to left. Extremely annoying. I used to press these shift-control combinations by accident -- usually CTRL-V and then SHIFT-[ or whatever -- and it drove me crazy until I figured out how to fix it. Right-aligned text is not pretty. It completely messes up your indentation.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  7. #7
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by dwks View Post
    This happens to me too. Under Windows Vista, in some programs, pressing " or ' or / or . or , or any special character, really, doesn't always work.
    There are several -- okay, many -- quote characters defined in Unicode. Windows seems to want to "help" you by turning pairs of quotation marks into balanced pairs of special open quotes and closed quotes. Seemingly right out from under you. The resulting Unicode code is mapped, improperly, to a codepoint in the current code set, which is usually NOT a compatible code set (i.e. it doesn't have the characters necessary). And you get this garbage.

    This behavior used to be confined only to Microsoft Word. It seems to be leaking into other places now.

  8. #8
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    No, it's not quite the same thing.

    Here's what happens. You press '. Nothing happens. You press it again -- you get an extended Latin character from here: http://www.decodeunicode.org/en/latin_extended-a

    You press colon, nothing happens -- you press e, and you get an e with a diaeresis: http://www.decodeunicode.org/en/u+00eb

    And so on. Basically, nothing happens the first time you press the key, and then you press something else, and then weird characters show up.

    It only seems to happen to older programs running under my Vista machine -- although it has happened once or twice to MSVC, it nearly always happens to Dev-C++ and SciTE, and Notepad is virtually immune.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  9. #9
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by dwks View Post
    No, it's not quite the same thing.

    Here's what happens. You press '. Nothing happens. You press it again -- you get an extended Latin character from here: http://www.decodeunicode.org/en/latin_extended-a

    You press colon, nothing happens -- you press e, and you get an e with a diaeresis: http://www.decodeunicode.org/en/u+00eb
    This almost sounds like some kind of diacritic entry mode for people who don't have all the European keys on their keyboards. Maybe you've accidentally turned on some kind of international keyboard mode? Or maybe the programs itself do this -- accidentally?

    It only seems to happen to older programs running under my Vista machine -- although it has happened once or twice to MSVC, it nearly always happens to Dev-C++ and SciTE, and Notepad is virtually immune.
    It sure sounds like a bug where apps are somehow causing some international entry mode to turn on...

  10. #10
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by dwks View Post
    No, it's not quite the same thing.

    Here's what happens. You press '. Nothing happens. You press it again -- you get an extended Latin character from here: http://www.decodeunicode.org/en/latin_extended-a

    You press colon, nothing happens -- you press e, and you get an e with a diaeresis: http://www.decodeunicode.org/en/u+00eb

    And so on. Basically, nothing happens the first time you press the key, and then you press something else, and then weird characters show up.

    It only seems to happen to older programs running under my Vista machine -- although it has happened once or twice to MSVC, it nearly always happens to Dev-C++ and SciTE, and Notepad is virtually immune.
    I find that it helps to hit space in those situations - you then get the character you wanted without the "decorations" [assuming you don't use an English keyboard layout, in which case it's all straight forward with no problems].

    Actually, semi-modern typewriters sometimes [in countries where A-Z are not sufficient to describe all sounds, e.g. Swedish, German, French etc] had "no movement keys", such as diaresis and single-quotes too - worked the same way.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  11. #11
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    This almost sounds like some kind of diacritic entry mode for people who don't have all the European keys on their keyboards. Maybe you've accidentally turned on some kind of international keyboard mode? Or maybe the programs itself do this -- accidentally?

    It sure sounds like a bug where apps are somehow causing some international entry mode to turn on...
    That was my thinking -- but why would pressing shift and control a few times change things? I suppose if it switches the reading order in IE it must have something to do with internationalization . . . .

    I find that it helps to hit space in those situations - you then get the character you wanted without the "decorations" [assuming you don't use an English keyboard layout, in which case it's all straight forward with no problems].
    Hmm, never tried that. The shift-control trick seems to disable it permanently, though.

    It is a US keyboard layout, though.

    Anyhow, I'm not too concerned -- I never use Vista unless I can help it anyway.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM