• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ascii characters for stringtokenizer

 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a huge data which are read using string tokenizer. I need two delimietrs. one for different row and one for different field (say, database field). I am using '\n' as row delimiter, can someone suggest me a ascii character (or whatever unique) for another delimiter?
no special chars like !@#...no '\r' or '\t'....something unique which the user cannot enter manually.
Thanks.
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmmm... this doesn't have anything to do with Swing/JFC/AWT... so I'm moving it to the Java In General (Intermediate) forum.
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We use octal 205 (decimal 133) character as the delimiter. We determined that this character cannot be entered easily by any user.
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You mean this - �?
I used 4 key strokes on the keyboard.
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There isn't really any character that can't be input (without validating/controlling the user's input).
I'm no expert, but I'd probably pick some character that would be highly unlikely to be input. A character such as 240 which is ≡. I likely wouldn't pick 133 as I know plenty of people who speak Vietnamese and use that character often.
Take a look at http://www.asciitable.com for some ideas.
 
Hari Gangadharan
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your application is used internationaly then you may have to use a little more higher ASCII character. Our application uses data from mainframe and it is impossible to have the asci 133 in that (Mainframe uses EBCIDIC - and we convert it to ASCII while transferring).
reply
    Bookmark Topic Watch Topic
  • New Topic