Click here to Skip to main content
15,900,665 members
Home / Discussions / C#
   

C#

 
GeneralRe: Threading Question Pin
harold aptroot11-Jun-10 9:29
harold aptroot11-Jun-10 9:29 
GeneralRe: Threading Question Pin
LimitedAtonement11-Jun-10 10:31
LimitedAtonement11-Jun-10 10:31 
GeneralRe: Threading Question Pin
Luc Pattyn11-Jun-10 11:23
sitebuilderLuc Pattyn11-Jun-10 11:23 
GeneralRe: Threading Question Pin
Daniel Grunwald11-Jun-10 13:58
Daniel Grunwald11-Jun-10 13:58 
GeneralRe: Threading Question Pin
Luc Pattyn11-Jun-10 14:58
sitebuilderLuc Pattyn11-Jun-10 14:58 
AnswerRe: Threading Question Pin
LimitedAtonement15-Jun-10 2:49
LimitedAtonement15-Jun-10 2:49 
QuestionRe: Threading Question Pin
LimitedAtonement15-Jun-10 2:48
LimitedAtonement15-Jun-10 2:48 
QuestionProblem Here how can i deal [modified] Pin
Pellatrex11-Jun-10 2:14
Pellatrex11-Jun-10 2:14 
Welcome everyone

Have a big problem in the end this code

This code works with one of the chat games networks
But it does not appear the Arabic letters
But appear in this form
????????????
While the characters appear as English is

How can I deal with this situation


using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Threading;
using System.Text;
using System.IO;

namespace ConquerSx.PacketHandling
{
    public class Chat
    {
        public static void Handle(Main.GameClient GC, byte[] Data)
        {

            MemoryStream MS = new MemoryStream(Data);
            BinaryReader BR = new BinaryReader(MS);
            BR.ReadBytes(8);
            ushort ChatType = (ushort)BR.ReadUInt32();
            BR.ReadBytes(13);
            string From = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte()));
            string To = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte()));
            BR.ReadByte();
            string Message = Encoding.ASCII.GetString(BR.ReadBytes(BR.ReadByte()));
            BR.Close();
            MS.Close();
            #region BadWords
            Message = Message.Replace("http:/", "****");
            Message = Message.Replace(".net", "****");
            Message = Message.Replace(".com", "****");
            Message = Message.Replace(".tk", "****");
            Message = Message.Replace("www", "****");
            Message = Message.Replace("damn", "****");
            Message = Message.Replace("f***", "****");
            Message = Message.Replace("sh*t", "****");
            Message = Message.Replace("stupid", "******");
            Message = Message.Replace("wtf", "***");
            Message = Message.Replace("idiot", "*****");
            Message = Message.Replace("f***er", "******");
            #endregion


modified on Friday, June 11, 2010 9:26 PM

AnswerRe: Problem Here how can i deal Pin
Richard MacCutchan11-Jun-10 2:55
mveRichard MacCutchan11-Jun-10 2:55 
AnswerRe: Problem Here how can i deal Pin
R. Giskard Reventlov11-Jun-10 2:55
R. Giskard Reventlov11-Jun-10 2:55 
AnswerRe: Problem Here how can i deal Pin
Peace ON11-Jun-10 2:56
Peace ON11-Jun-10 2:56 
AnswerRe: Problem Here how can i deal Pin
Luc Pattyn11-Jun-10 3:00
sitebuilderLuc Pattyn11-Jun-10 3:00 
AnswerRe: Problem Here how can i deal Pin
harold aptroot11-Jun-10 3:00
harold aptroot11-Jun-10 3:00 
GeneralRe: Problem Here how can i deal Pin
Luc Pattyn11-Jun-10 3:47
sitebuilderLuc Pattyn11-Jun-10 3:47 
AnswerRe: Problem Here how can i deal Pin
riced11-Jun-10 4:29
riced11-Jun-10 4:29 
GeneralRe: Problem Here how can i deal Pin
Eddy Vluggen11-Jun-10 5:10
professionalEddy Vluggen11-Jun-10 5:10 
GeneralRe: Problem Here how can i deal Pin
Luc Pattyn11-Jun-10 5:25
sitebuilderLuc Pattyn11-Jun-10 5:25 
AnswerRe: Problem Here how can i deal Pin
i.j.russell12-Jun-10 0:03
i.j.russell12-Jun-10 0:03 
QuestionCombobox problem Pin
Hum Dum10-Jun-10 23:02
Hum Dum10-Jun-10 23:02 
AnswerRe: Combobox problem Pin
ddecoy11-Jun-10 1:15
ddecoy11-Jun-10 1:15 
GeneralRe: Combobox problem Pin
Hum Dum11-Jun-10 1:58
Hum Dum11-Jun-10 1:58 
AnswerRe: Combobox problem Pin
Luc Pattyn11-Jun-10 1:21
sitebuilderLuc Pattyn11-Jun-10 1:21 
GeneralRe: Combobox problem Pin
ddecoy11-Jun-10 1:41
ddecoy11-Jun-10 1:41 
GeneralRe: Combobox problem Pin
Luc Pattyn11-Jun-10 1:59
sitebuilderLuc Pattyn11-Jun-10 1:59 
GeneralRe: Combobox problem Pin
Hum Dum11-Jun-10 2:27
Hum Dum11-Jun-10 2:27 

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.