473,466 Members | 1,534 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Created an SMTP Server but now need to receive Japanese character

Hi All,

I have taken over some code that listens on port 25 and does the
following:

private byte[] buffer = new byte[BufferSize]; // Receive buffer.
While there is data:

......
bytesRead = clientSocket.Receive(buffer, 0, 1024, SocketFlags.None);
......
content = Encoding.ASCII.GetString(buffer,0,bytesRead);

my problem is that when I receive japanese chars they are represented
as:

=E5=8C and so on. Surely this isn't right? I tried:

content2 = Encoding.Unicode.GetString(buffer,0,bytesRead);

and this just converts all the text, be it ascii or not to garbage. If
someone could point me in the right direct that would be great. I
guess what I'm after is how should I read the stream to make the best
use of the data. Is there a way of knowing the incoming encoding for
SMTP?

Basically what the system does is:

listens on port 25; reads the message; changes a string in the message
and then inserts the blob into a database; the blob is then sent on to
a list of people as an email

Cheers

-m
Nov 16 '05 #1
0 933

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Andy Turner | last post by:
Hi, I'm trying to setup PHP so it will use a remote SMTP server. I'm going to sound like a newbie but how? I know you need to alter php.ini, change SMTP from localhost to the SMTP server and the...
2
by: David | last post by:
Hi Group, I'm having a few problems with getting an SMTP server configured on my Windows 2000 Server web server. My web server is co-located at my hosts and i use VNC to remotely access the web...
1
by: Vishal | last post by:
Hello! My client has a need to be able to store Japanese characters in their PeopleSoft database. So we need to change the character set from from Latin1_General (1252) to Japanese character set...
5
by: Andreas | last post by:
I am working with three computers, my developing computer, a Web Server and a Mail Server (Exchange). I am trying to send a email from the Web Server via the Mail Server to a valid email address...
2
by: Dave | last post by:
Hello, I am trying to write an application that will talk to an SMTP server using sockets. I can connect to the server just fine, then I can receive the first message from the server. I can then...
34
by: antonyliu2002 | last post by:
I've set up the virtual smtp server on my IIS 5.1 like so: 1. Assign IP address to "All Unassigned", and listen to port 25. 2. Access Connection granted to "127.0.0.1". 3. Relay only allow...
40
by: apprentice | last post by:
Hello, I'm writing an class library that I imagine people from different countries might be interested in using, so I'm considering what needs to be provided to support foreign languages,...
1
by: Marco Miltenburg | last post by:
While working on some multilingual code I found a rather strange thing happening with Server.HTMLEncode. While loading different languages I change the Codepage and Charset in ASP to reflect the...
0
by: jlconde | last post by:
I have a classe to send mails. It runs on yahoo well but with hotmail I never receive the mails.I do not receive an error neither. I would need some strange header to make the hotmail like my...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.