Register for your free account! | Forgot your password?

You last visited: Today at 07:34

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Arabic Language !!

Discussion on Arabic Language !! within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2008
Posts: 708
Received Thanks: 46
Arabic Language !!

i'm asking if i can make NPC Talk With Arabic Language please
magnon is offline  
Old 05/12/2012, 19:40   #2


 
CptSky's Avatar
 
elite*gold: 0
Join Date: Jan 2008
Posts: 1,443
Received Thanks: 1,175
Quote:
Originally Posted by magnon View Post
i'm asking if i can make NPC Talk With Arabic Language please
CO2 uses CP1252 by default. But, it is probably possible to set the locale to CP1256 (Windows Arabic Code Page). So, I would say yes.

CP1256 doesn't seems to be really complete (I don't know arabic, so I can't really say). If you need UNICODE to have a full arabic set, it will be impossible to set the locale to UTF-8.
CptSky is offline  
Old 05/12/2012, 19:48   #3
 
elite*gold: 0
Join Date: Oct 2008
Posts: 708
Received Thanks: 46
Code:
 public string Text {
            get { return Encoding.UTF7.GetString(Buffer, 14, Buffer[13]); }
            set {
                int realloc = value.Length + 8 + 17;
                if (realloc != Buffer.Length) {
                    byte[] new_Packet = new byte[realloc];
                    System.Buffer.BlockCopy(Buffer, 0, new_Packet, 0, 24);
                    Buffer = new_Packet;
                }
                WriteUInt16((ushort)(value.Length + 17), 0, Buffer);
                WriteStringWithLength(value[#59687
how to Encoding this for Arabic
magnon is offline  
Old 05/12/2012, 20:01   #4
 
elite*gold: 0
Join Date: Mar 2009
Posts: 228
Received Thanks: 47
yes _ but with ar client 'Qahr'
dego4ever is offline  
Thanks
1 User
Old 05/12/2012, 20:10   #5
 
elite*gold: 0
Join Date: Oct 2008
Posts: 708
Received Thanks: 46
Quote:
Originally Posted by dego4ever View Post
yes _ but with ar client 'Qahr'
Yes i have Arabic Clint
magnon is offline  
Old 05/12/2012, 20:24   #6
 
elite*gold: 0
Join Date: Mar 2009
Posts: 228
Received Thanks: 47
then try to use this

Code:
public static void WriteString(string arg, int offset, byte[] buffer)
        {
            if (buffer == null)
                return;
            if (offset > buffer.Length - 1)
                return;
            if (buffer.Length >= offset + arg.Length)
            {
                var bytes = Encoding.Default.GetBytes(arg);
                {
                    ushort i = 0;
                    while (i < arg.Length)
                    {
                        buffer[(ushort)(i + offset)] = bytes[i];
                        i = (ushort)(i + 1);
                    }
                }
            }
        }
& if u will get strings from sql db, don't forget to make charset = "utf8"
dego4ever is offline  
Old 05/12/2012, 20:33   #7
 
elite*gold: 0
Join Date: Oct 2008
Posts: 708
Received Thanks: 46
Quote:
Originally Posted by dego4ever View Post
then try to use this

Code:
public static void WriteString(string arg, int offset, byte[] buffer)
        {
            if (buffer == null)
                return;
            if (offset > buffer.Length - 1)
                return;
            if (buffer.Length >= offset + arg.Length)
            {
                var bytes = Encoding.Default.GetBytes(arg);
                {
                    ushort i = 0;
                    while (i < arg.Length)
                    {
                        buffer[(ushort)(i + offset)] = bytes[i];
                        i = (ushort)(i + 1);
                    }
                }
            }
        }
& if u will get strings from sql db, don't forget to set charset to "utf8"
Encoding.utf7 work on chat but not work on NPC
magnon is offline  
Old 05/12/2012, 20:50   #8
 
elite*gold: 0
Join Date: Mar 2009
Posts: 228
Received Thanks: 47
you write packet not read,
dego4ever is offline  
Old 05/12/2012, 20:54   #9
 
elite*gold: 0
Join Date: Oct 2008
Posts: 708
Received Thanks: 46
Then how can i do
magnon is offline  
Old 05/12/2012, 21:16   #10
 
elite*gold: 0
Join Date: Mar 2009
Posts: 228
Received Thanks: 47
Thumbs up

go to "WriteStringWithLength" void or
search for "
Code:
public static void WriteStringWithLength(string arg, int offset, byte[] buffer)
"

and replace with this

Code:
public static void WriteStringWithLength(string arg, int offset, byte[] buffer)
        {
            if (buffer == null)
                return;
            if (offset > buffer.Length - 1)
                return;
            int till = buffer.Length - offset;
            till = Math.Min(arg.Length, till);
            buffer[offset] = (byte)arg.Length;
            offset++;
            ushort i = 0;
            var bytes = Encoding.Default.GetBytes(arg);
            while (i < till)
            {
                buffer[(ushort)(i + offset)] = bytes[i];
                i = (ushort)(i + 1);
            }
        }
and it will be ok
dego4ever is offline  
Thanks
1 User
Old 05/12/2012, 21:23   #11
 
2slam's Avatar
 
elite*gold: 0
Join Date: Jan 2009
Posts: 586
Received Thanks: 336
how about using Qahr client just get ur dll files and Conquer.exe and run ur server
2slam is offline  
Old 05/12/2012, 21:26   #12
 
elite*gold: 0
Join Date: Oct 2008
Posts: 708
Received Thanks: 46
Oh thank you alot for your help but broadCast not Work

Oh thank you alot for your help it's work now but broadcast not work

Quote:
Originally Posted by 2slam View Post
how about using Qahr client just get ur dll files and Conquer.exe and run ur server
Thanks 2sllam for your help it's work now thx ya gamel
magnon is offline  
Reply


Similar Threads Similar Threads
SRO New Version in ARAbic Language
01/26/2010 - Silkroad Online - 12 Replies
hello For pleasure that's silkroad had made A new version with Arabic language http://img.joymax.com/property/silkroad/silkroado nline_3/ntg_img/event_img/1001/sp1_egypt/banner_26 0X90.gif in ARABIC have A nice time Arabian player



All times are GMT +1. The time now is 07:37.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.