Click here to Skip to main content
15,914,642 members
Home / Discussions / C#
   

C#

 
GeneralRe: Continuation of Correct way of doing installers Pin
glennPattonWork33-Jul-12 5:46
professionalglennPattonWork33-Jul-12 5:46 
GeneralRe: Continuation of Correct way of doing installers Pin
glennPattonWork33-Jul-12 5:59
professionalglennPattonWork33-Jul-12 5:59 
GeneralRe: Continuation of Correct way of doing installers Pin
glennPattonWork33-Jul-12 3:20
professionalglennPattonWork33-Jul-12 3:20 
QuestionText conversion Pin
Satay843-Jul-12 0:09
Satay843-Jul-12 0:09 
AnswerRe: Text conversion Pin
Eddy Vluggen3-Jul-12 0:51
professionalEddy Vluggen3-Jul-12 0:51 
GeneralRe: Text conversion Pin
Satay843-Jul-12 19:36
Satay843-Jul-12 19:36 
AnswerRe: Text conversion Pin
Eddy Vluggen4-Jul-12 1:03
professionalEddy Vluggen4-Jul-12 1:03 
GeneralRe: Text conversion Pin
Satay844-Jul-12 2:05
Satay844-Jul-12 2:05 
As You told me I convert sorce data to iso-8859-2 and then to UTF-8, but the result was the same. If I convert english docs it works perfect, but when I use polish docs i get this result string: "."

There's solution that I create for this:

C#
FileStream fs = null;
				try
				{
					fs = new FileStream(plik.ToString(), FileMode.Open);
					byte[] example = new byte[fs.Length];
					fs.Read(example, 0, example.Length);
					string outtext = "";
					int count = 0;
					
					for (int i = 2560; i < example.Length; i++)
					{
						if (example[i] == 0)
						{
							break;
						}
						count++;
					}
					
					BinaryReader br = new BinaryReader(fs, Encoding.GetEncoding("iso-8859-2"));
					br.BaseStream.Position = 2560;
					byte[] newarr = br.ReadBytes(count);
					outtext = System.Text.UTF8Encoding.UTF8.GetString(newarr);
					string str = "";
					                                   
					for (int i = 0; i < outtext.Length; i++)
					{
						if ((outtext[i] >= '!' && outtext[i] <= '~') || (outtext[i] == ' ') || (outtext[i] == '\r'))
						{
							str += outtext[i];
						}
					}
					fs.Close();
					tekst = str;
				}
				catch (Exception exc)
				{
					Console.WriteLine(exc.ToString());
					return;

}

So could anybody give me any other advice?
AnswerRe: Text conversion Pin
Eddy Vluggen4-Jul-12 2:15
professionalEddy Vluggen4-Jul-12 2:15 
GeneralRe: Text conversion Pin
Satay844-Jul-12 2:45
Satay844-Jul-12 2:45 
AnswerRe: Text conversion Pin
Eddy Vluggen4-Jul-12 3:05
professionalEddy Vluggen4-Jul-12 3:05 
GeneralRe: Text conversion Pin
Satay844-Jul-12 3:21
Satay844-Jul-12 3:21 
GeneralRe: Text conversion Pin
Eddy Vluggen4-Jul-12 3:27
professionalEddy Vluggen4-Jul-12 3:27 
Questionhow to get a ressource folder into the in folder Pin
baranils3-Jul-12 0:02
baranils3-Jul-12 0:02 
AnswerRe: how to get a ressource folder into the in folder Pin
Eddy Vluggen3-Jul-12 0:52
professionalEddy Vluggen3-Jul-12 0:52 
GeneralRe: how to get a ressource folder into the in folder Pin
baranils3-Jul-12 1:04
baranils3-Jul-12 1:04 
AnswerRe: how to get a ressource folder into the in folder Pin
Luc Pattyn3-Jul-12 0:58
sitebuilderLuc Pattyn3-Jul-12 0:58 
QuestionFacebook ads application Pin
twotwins2-Jul-12 22:21
twotwins2-Jul-12 22:21 
AnswerRe: Facebook ads application Pin
Eddy Vluggen3-Jul-12 0:54
professionalEddy Vluggen3-Jul-12 0:54 
GeneralRe: Facebook ads application Pin
twotwins3-Jul-12 2:28
twotwins3-Jul-12 2:28 
AnswerRe: Facebook ads application Pin
Eddy Vluggen3-Jul-12 2:44
professionalEddy Vluggen3-Jul-12 2:44 
GeneralRe: Facebook ads application Pin
twotwins3-Jul-12 3:46
twotwins3-Jul-12 3:46 
QuestionHow To Create a Image Cup Pin
Anubhava Dimri2-Jul-12 20:42
Anubhava Dimri2-Jul-12 20:42 
AnswerRe: How To Create a Image Cup Pin
Mycroft Holmes2-Jul-12 21:39
professionalMycroft Holmes2-Jul-12 21:39 
AnswerREPOST: How To Create a Image Cup Pin
Dave Kreskowiak3-Jul-12 1:28
mveDave Kreskowiak3-Jul-12 1:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.