You last visited: Today at 22:48
Advertisement
Arabic Language !!
Discussion on Arabic Language !! within the CO2 Private Server forum part of the Conquer Online 2 category.
05/12/2012, 19:31
#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
05/12/2012, 19:40
#2
elite*gold: 0
Join Date: Jan 2008
Posts: 1,446
Received Thanks: 1,179
Quote:
Originally Posted by
magnon
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.
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
05/12/2012, 20:01
#4
elite*gold: 0
Join Date: Mar 2009
Posts: 228
Received Thanks: 47
yes _ but with ar client 'Qahr'
05/12/2012, 20:10
#5
elite*gold: 0
Join Date: Oct 2008
Posts: 708
Received Thanks: 46
Quote:
Originally Posted by
dego4ever
yes _ but with ar client 'Qahr'
Yes i have Arabic Clint
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"
05/12/2012, 20:33
#7
elite*gold: 0
Join Date: Oct 2008
Posts: 708
Received Thanks: 46
Quote:
Originally Posted by
dego4ever
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
05/12/2012, 20:50
#8
elite*gold: 0
Join Date: Mar 2009
Posts: 228
Received Thanks: 47
you write packet not read,
05/12/2012, 20:54
#9
elite*gold: 0
Join Date: Oct 2008
Posts: 708
Received Thanks: 46
Then how can i do
05/12/2012, 21:16
#10
elite*gold: 0
Join Date: Mar 2009
Posts: 228
Received Thanks: 47
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
05/12/2012, 21:23
#11
elite*gold: 0
Join Date: Jan 2009
Posts: 586
Received Thanks: 337
how about using Qahr client just get ur dll files and Conquer.exe and run ur server
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
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
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 +2. The time now is 22:49 .