| | |
Decoding problems
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2008
Posts: 2
Reputation:
Solved Threads: 0
C# Syntax (Toggle Plain Text)
System.Text.Encoding enc = System.Text.Encoding.Unicode; byte[] bytes = enc.GetBytes(plainTextContent); string decodedText = Encoding.GetEncoding(charset).GetString(bytes);
"charset" is ISO-8859-1. If i use Unicode encoding, the GetString() method returns only the first character of bytes[], if i use ASCII or UTF-8 encoding i get all characters but there are some characters that are represented with "?"(so, GetString is unable to decode them). So i have two questions, how do i know which encoding to use, UTF-8, ASCII, Unicode or whatever...The message that i want to decode is the plain text body of an email message. The second question is...well, how to decode these "?" characters?
![]() |
Similar Threads
- IIS URL decoding (ASP)
- problems with mktime function (PHP)
- My .php page won't load on Macs (PHP)
- Python and PHP integration help: Incorrect Image URL decode? (PHP)
- Quicktime Buffer Overrun Error (Viruses, Spyware and other Nasties)
- parsing html (Java)
- DVD+RW/+R Burning problems Update (Storage)
- Big Baddie wont cant DL dllfix.exe - Please review HJT log (Viruses, Spyware and other Nasties)
Other Threads in the C# Forum
- Previous Thread: Capture Context on CTRL+C
- Next Thread: How to click links on the backgroun
| Thread Tools | Search this Thread |
.net access activedirectory ado.net algorithm array barchart bitmap box broadcast buttons c# check checkbox client color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees development disabled displayingopenforms draganddrop drawing encryption enum event excel exectuable file files form format forms ftp function gdi+ httpwebrequest image index index-error input install java label list listbox listener mandelbrot math mathematics mouseclick mysql operator path photoshop picturebox pixelinversion post prime programming radians regex remote remoting richtextbox serialization server setup sleep socket sql statistics stream string table tcp text textbox thread time timer update user usercontrol validation visualstudio webbrowser windows winforms wpf xml





