Does HPUX have termcap or terminfo definitions for xterm? Are they accurate?
One workaround I've heard of is to try export TERM=dtterm. I've seen this done on Solaris, and it "works mostly", but I've also seen line wrapping problems and other oddities (again, because it's not xterm).
DO NOT use vt100 like someone else recommended. xterm != vt100. Some escape sequences are the same, but many (I repeat: MANY) are not. You'll end up with gobbledegook for output. PuTTY emulates xterm, not vt100. If you want a vt100 emulator, try SecureCRT.
Otherwise, I'd recommend getting the official xterm termcap from
the xterm site; you don't need to build the xterm binary, just pull the termcap entry out of the documentation (it's in there somewhere). You can also try the
putty terminfo/termcap definition, but I've tried it and it doesn't work that well (funny that, eh?)
If HPUX uses terminfo, you'll need to build a terminfo db based off of a terminfo description for xterm. That's probably also in the official tarball somewhere. Or you can
try Eric Raymond's page. You'll probably need to use tic(1) to compile such. I make no guarantees if HPUX's tic understands all of the terminfo definitions.
You can do all of this per-account (well, at least on Solaris/BSD/Linux; I assume HPUX offers similar capability) by doing something like export TERMINFO=$HOME/.terminfo, then placing the terminfo directory structure generated into there (you'll have a file/path like .terminfo/x/xterm, for example). I had to do this for some of our Solaris machines at work, since the stock Solaris xterm definition didn't have 256-colour capability (only 16; the 256 capability is an extension).
Hope this helps.