Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. problem in reading non-printable character

problem in reading non-printable character

Scheduled Pinned Locked Moved C#
help
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    maharaja pandian
    wrote on last edited by
    #1

    hi , Is it possible to read the string which having some non-printable character, its like a square symbol , i want to find if any string having this kind of character but i try with converting into ascii ,but it throws error "Input string was not in a correct format" this is the sample string 106/02/200611:57:321101 2003/12/11 09:12:38.000 +09:00 207TI5003 reply early very urgent:) send reply

    G 1 Reply Last reply
    0
    • M maharaja pandian

      hi , Is it possible to read the string which having some non-printable character, its like a square symbol , i want to find if any string having this kind of character but i try with converting into ascii ,but it throws error "Input string was not in a correct format" this is the sample string 106/02/200611:57:321101 2003/12/11 09:12:38.000 +09:00 207TI5003 reply early very urgent:) send reply

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      Where are you reading the string from? Do you know what encoding is used for the string? Strings in .NET is Uncocde, which supports virtually every character on the planet. (Characters that are not supported (yet?) are stuff like the Klingon alphabet and Tolkien runes...) Strings are usually not stored as 16 bit Uncode, so some kind of encoding is used when they are stored. You have to know this encoding to be able to correctly decode the string into Unicode. Some common encodings are 8 bit Unicode (UTF8) and Latin 1. ASCII encoding only support characters 0-127, so that is not suitable for what you are doing. --- b { font-weight: normal; }

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups