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
  1. Home
  2. General Programming
  3. C#
  4. convert cyrillic from console app to Unicode C#

convert cyrillic from console app to Unicode C#

Scheduled Pinned Locked Moved C#
helpcsharpquestion
1 Posts 1 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.
  • D Offline
    D Offline
    drweb86
    wrote on last edited by
    #1

    Hi I have already wrote about my problem. I have a string that comes from console app after it i convert it with this procedure static private string EncodeMessageForConsoleOutput(string Message) { //gag if (MemoLog == null) return Message; if (EncodingFrom.CodePage == EncodingTo.CodePage) return Message; Decoder decoder = Encoding.UTF8.GetDecoder(); byte[] bytes = Encoding.UTF8.GetBytes(Message); char[] chars = new char[bytes.Length * 5];//*2 int bytesUsed, charsUsed; bool completed; decoder.Convert(bytes, 0, bytes.Length, chars, 0, chars.Length, true, out bytesUsed, out charsUsed, out completed); string ResultString = new string(chars, 0, charsUsed); return ResultString; } but it does not work Could you help me what's the problem with this code?

    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