on 03-29-2007 2:31 PM
Hi
My RFC Server application recive data from SAP like "42/1 ??ู? 10 ?.บ????-????"
I guess problem about encoding because data from SAP is thai language
Can someone guide me how to fix?
regards
zemon
Hi Zemon,
while using nco you can set your encodings, have you looked at this point?
Best Regards,
Huseyin Akturk
SW Engineer & ABAP Consultant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
problem is
1 Should i config on SAP or Dotnet Server Application ?
On .net I try to test with code below but it still not work.
static void Main(string[] args)
{
String xString = "89/3 ?.1 ?.??????2 ?.?อ????บ?อ";
Byte[] xByte = Encoding.Unicode.GetBytes(xString);
Byte[] xBuffer = Encoding.Convert(Encoding.Default, Encoding.GetEncoding(874), xByte);
string output = Encoding.GetEncoding(874).GetString(xBuffer);
Console.WriteLine("Source:" + xString );
Console.WriteLine("Output:" + output);
while (Console.ReadLine() =="x") {
}
Hi Zemon,
when you input the string from the code itself, you are physically placing the characters "?.?อ????" in the string, these are garbled chars, and hence will not work
extract the string from the source directly and do a
response.write
to the browser
ensure that the Thai language pack is installed on the server (windows) & on the client (internet explorer)
this is a config issue and henc edoes not have code to be written
also you could try for localization in the ASP.NET web application in thai
<a href="http://msdn2.microsoft.com/en-us/library/aa308935(VS.71).aspx" target="_new">ASP.NET 1.1 localization example on msdn</a>
or something similar.
with respect,
amit
I try
public string ReturnString(string xString)
{
FileStream fs = new FileStream(@"c:123456.exe", FileMode.OpenOrCreate, FileAccess.Write);
BinaryWriter bw = new BinaryWriter(fs);
bw.Write(xString);
bw.Close();
fs.Close();
}
and the out that i open with winhex is
30 31 32 33 34 35 36 37 38 39
C2A1 C2A2 C2A3 C2A4 C2A5
I compare with utf8 table
first line is utf8 1 byte basic latin
second line is utf8 2 byte basic latin
Can you point me convert to windows-874 (it thai codepage that i think sql 2000 will be display in thai )?
Hi Zemon,
how are you doing ?
the characters which are not recognizable are the issue of the underlying viewers
NCo will bring the charaters in thier Hexadecimal format
So please ensure that your VS.NET installation has the language pack installed as well as the Windows OS underneath.
also when you output those characters in IE, the client needs to be able to understand the character [IE needs the language pack too]
i have successfully implemented a japanese language application [not thai], but it should work on the same principal
with respect,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Zemon,
have you tried to set the encoding? I can send simple examples;
//proxy request encoding
SapProxy1 proxy = new SapProxy1();
proxy.RequestEncoding = Encoding.GetEncoding("tr-TR"); // for Turkish
//connection codepage encoding
SAPConnection connection = new SAPConnection();
connection.CodepageEncoding = Encoding.GetEncoding("tr-TR"); // for Turkish
If helpful, don't forget rewarding points
Best Regards,
Huseyin Akturk
SW Engineer & ABAP Consultant
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.