• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get a "\n" in jad attribute?

 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Our servlet adds a couple of attributes to the jad file before it returns it.

The problem is that I want to include the "\n" character in the attribute value. But we include the "\n", we get invalid jad file, etc. on the phone.

Don't really want to have to use a separate text file, so does anyone know of any way round the problem?

Cheers,
James
 
Marcin Zduniak
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not understand what for you want to include "\n" sign into the JAD file, but the solution might be to place some other sign instead of "\n" (like # for example) in JAD and then change it on the client-side into proper sign.
 
James Hodgkiss
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hiya Marcin,

Yes, that is what I have ended up doing - using String's replace('^', (char)(10)) to convert, but just wondered if there was another way.

The jad attribute in question is basically a help string which is dependant on the type of phone. The \n's are to improve how it is displayed on the phone.

Thanks for the reply.

Cheers,
James
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic