- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Wrong character mapping in console mode
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2010 01:09 AM
тАО03-31-2010 01:09 AM
Wrong character mapping in console mode
I have an HP workstation working under HP-UX 11.11. The keyboard layout ist set to USB_PS2_DIN_German_Euro
Wenn I log in in console mode, the TERM variable is set to 'hp'. Unfortunately, some characters don't appear as they should be.
Especially annoying is the minus character. It actually works like a minus (-) but appears on the screen like a caret (^).
Also as I'm using the tcsh, the arrow keys should allow me to scroll through the history but they don't work at all.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2010 03:42 AM
тАО03-31-2010 03:42 AM
Re: Wrong character mapping in console mode
This is very strange, as both minus and caret are part of the basic 7-bit ASCII character set, which is unchanged in most 8-bit character sets.
If the minus sign actually appears like a caret, the problem might be that the font used on the display uses a different character encoding than the keyboard layout. But I don't know any character set which would make such a deviation in the basic ASCII set.
Could you please run the following commands and tell us what is the output in each case?
expr 2 ^ 3
expr 2 - 3
> Also as I'm using the tcsh, the arrow keys should allow me to scroll through the history but they don't work at all.
tcsh is not part of standard HP-UX 11.11, so it's probably been installed from a third-party source. Perhaps the packager did not modify the shell's defaults to include the HP arrow key definitions?
The standard tcsh has a built-in mapping for ANSI/vt100-style arrow keys. This includes xterm, so in X11 environment the arrow keys will work automatically. As vt100 is one of the most common terminal emulations, it is likely that the arrow keys will work on most common remote connections too. But the HP terminals' arrow key definitions are not built in.
By default, tcsh does not use TERM, but the older TERMCAP variable. The TERMCAP variable should include the entire terminal feature description, not just the name of the terminal. If you use tcsh and that version has not been extensively modified to use the terminfo library instead of termcap, you probably should add some commands to your login scripts to populate the TERMCAP variable, as HP-UX does not do it by default.
If TERMCAP is populated correctly, tcsh should automatically get the terminal-type-specific arrow key mappings from it. Failing that, the "bindkey" command could be used to explicitly force the key mappings.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2010 04:19 AM
тАО03-31-2010 04:19 AM
Re: Wrong character mapping in console mode
> expr 2 ^ 3
> expr 2 - 3
Both produce 2^3 as output.
> If TERMCAP is populated correctly, tcsh should automatically get the terminal-type-specific arrow key mappings from it
OK, interesting hint. I will delve somewhat into TERMCAP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2010 07:19 AM
тАО03-31-2010 07:19 AM
Re: Wrong character mapping in console mode
How can I find out which font and which encoding is beeing used?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2010 11:07 AM
тАО03-31-2010 11:07 AM
Re: Wrong character mapping in console mode
>> expr 2 - 3
>Both produce 2^3 as output.
Sorry, I should have mentioned that all the spaces are essential.
If entered exactly as I wrote them, with spaces separating each character after "expr", one of these should output "-1" and the other "expr: syntax error". The question is, which one?
> How can I find out which font and which encoding is beeing used?
It's been too long since I seriously worked with HP-UX _workstations_... but as you said you're logging in console mode (aka Internal Terminal Emulator, or ITE), the name of the font is probably known only by the hardware/firmware developers.
In ITE, if my hazy memory is correct, the (default) character encoding is HP Roman8. That would not explain the discrepancy between the caret and the minus sign: in that character set, both of those characters conform to standard ASCII.
But if you're using the console in GUI mode, the character set can be selected in the login dialog. If you choose a non-default language and/or character set when logging in, your choice will automatically be remembered the next time you log in.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-31-2010 11:25 PM
тАО03-31-2010 11:25 PM
Re: Wrong character mapping in console mode
>If entered exactly as I wrote them, with spaces separating each character after "expr", one of these should output "-1" and the other "expr: syntax error". The question is, which one?
*) If I type in: expr 2 ^ 3 (with the caret key), the output is:
hostname:> expr 2 ^ 3
expr: Syntax error
*) If I type in: expr 2 - 3 (with the minus key), the output is:
hostname:> expr 2 ^ 3
^1
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2010 01:16 AM
тАО04-01-2010 01:16 AM
Re: Wrong character mapping in console mode
>*) If I type in: expr 2 - 3: hostname:> expr 2 ^ 3: ^1
Hmm, so two different inputs produce the same char on the screen but they are different.
So these would show the same char (^) but different hex values:
echo "-" | xd -tx1 -tc
echo "^" | xd -tx1 -tc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-01-2010 02:19 AM
тАО04-01-2010 02:19 AM
Re: Wrong character mapping in console mode
>echo "-" | xd -tx1 -tc
>echo "^" | xd -tx1 -tc
OK, this was a bit complicated to test because it appeared that the pipe character doesn't work. So from a remote host I put the 2 commands in a script and then ran it on the local console.
This is the result:
*) with the minus key:
0000000 2d a
^ Zn
0000002
*) with the caret key:
0000000 5e a
^ Zn
0000002
As you can see, the backslash (\) is also affected as it appears on the screen as "Z"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2010 05:51 AM
тАО04-06-2010 05:51 AM
Re: Wrong character mapping in console mode
With US_English layout, the appearance on the screen correlates with the keys. With German or French e.g., a few keys show differently on the screen but are interpreted correctly as typed in.
Could this be some locale or language bug? Is there maybe a patch for it?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-11-2010 11:02 PM
тАО04-11-2010 11:02 PM
Re: Wrong character mapping in console mode
no reaction for more than 10 days. The problem still exists. Does really no one have an an idea about my 2 previous postings.
Regards