LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-04-2014, 10:44 AM   #1
lamletoi
Member
 
Registered: Oct 2011
Posts: 46

Rep: Reputation: Disabled
Unicode Encoding in Linux Server


Hi,
I am having a problem with my DirectAdmin Server,
Host: Centos 6 32 bits.

When some body send an email to any email account in my directadmin server with unicode fonts.
They can read it but when they reply the email with a unicode character the reader can not read it.
Example :

Quote:

Sorry, I put the unicode line here but it display corectly here in linuxquestions
I have post on another site here:
http://stackoverflow.com/questions/2...n-linux-server
I check it out and see my server use &#unicode;

Could somebody help me to change the encoding in my server.
Thanks

Last edited by lamletoi; 06-04-2014 at 10:48 AM.
 
Old 06-04-2014, 02:32 PM   #2
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

your description of the problem is very confusing, I can't really follow you.

Quote:
Originally Posted by lamletoi View Post
When some body send an email to any email account in my directadmin server with unicode fonts.
Unicode is not a font; it's a character set. And by specification, web documents and e-mails always use Unicode or a subset thereof.

Quote:
Originally Posted by lamletoi View Post
They can read it but when they reply the email with a unicode character the reader can not read it.
Example :
http://stackoverflow.com/questions/2...n-linux-server
I check it out and see my server use &#unicode;
That sample tells us nothing - except that whoever composed the e-mail message used HTML-style numerical character references (NCRs), which is a concept of HTML and is totally out of place in e-mail. Unless we're talking about HTML-formatted mails, which is a nuisance of its own and would deserve explicit mentioning.

Quote:
Originally Posted by lamletoi View Post
Could somebody help me to change the encoding in my server.
This is nothing that could be set "on your server", it's a per-user setting of the mail client. And especially, it might not be a problem on your end, but at the sender's end. So in order to help you, I'm afraid I need a more detailed description of the problem.

[X] Doc CPU
 
Old 06-04-2014, 06:14 PM   #3
lamletoi
Member
 
Registered: Oct 2011
Posts: 46

Original Poster
Rep: Reputation: Disabled
I have attached the origin email and some lines in the mainlog send from my directadmin server.
I can not read it using my gmail account because it did not display the character correctly.
Attached Thumbnails
Click image for larger version

Name:	Untitled.png
Views:	25
Size:	28.6 KB
ID:	15672  

Last edited by lamletoi; 06-04-2014 at 09:48 PM.
 
Old 06-05-2014, 11:07 AM   #4
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by lamletoi View Post
I have attached the origin email and some lines in the mainlog send from my directadmin server.
I'm sorry, but this doesn't clarify much for me. That's a snippet from some log file, and apparently it logs (among other things) mail messages being sent or received. No idea from who, I just guess it's some daemon that sends status messages per mail.

But does the weird mix of letters make sense to you? Is it actually text in some language? To me, it looks like random characters. But then I'm aware that the world is full of languages I don't understand.
Anyway, whoever creates and sends these messages, makes the mistake of putting HTML-style character references into it where they don't belong. No receiving client would have any reason to resolve these character references. It's like putting Chinese symbols into an English text because you think it looks fancy, and expect that people can read it correctly.

So your task should be: Find out which process creates these garbled messages, and configure it properly, so it doesn't generate these character references any more, but instead puts the desired character directly into the message.

Quote:
Originally Posted by lamletoi View Post
I can not read it using my gmail account because it did not display the character correctly.
Use a decent mail client. ;-)

[X] Doc CPU
 
1 members found this post helpful.
Old 06-05-2014, 11:50 AM   #5
lamletoi
Member
 
Registered: Oct 2011
Posts: 46

Original Poster
Rep: Reputation: Disabled
Thanks for your support and so sory when making you feel confusing,
I use SquirrelMail to compose those emails.
The content is a vietnamese string(Unicode).
I use the EXIM at MTA.
I can not figure out which way to find out the daemons creates these garbled messages.
Attached Thumbnails
Click image for larger version

Name:	1.png
Views:	21
Size:	16.0 KB
ID:	15675   Click image for larger version

Name:	2.png
Views:	28
Size:	14.8 KB
ID:	15676  
 
Old 06-05-2014, 12:38 PM   #6
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by lamletoi View Post
Thanks for your support and so sory when making you feel confusing,
I use SquirrelMail to compose those emails.
The content is a vietnamese string(Unicode).
I use the EXIM at MTA.
okay, now that could be helpful information - if only I knew Squirrel Mail and Exim better.

I have a theory, though: What strikes me is that all the garbled characters have a double diacritic mark in the original representation, while the others have only one diacritic mark or none at all - they could as well appear in any Western script. My theory is that Squirrel Mail is using a character encoding that limits it to a basic character set, something like the ISO-8859 family maybe, but it has a built-in way to circumvent this limit, which is escaping these characters as HTML character references. This is an appropriate strategy where the context is HTML, but not in a non-HTML context like mail or plain text.

If you can dig into Squirrel Mail and find a way to make it use UTF-8 as its standard character encoding, you might be done. Exim is probably innocent here; as an MTA, it should only pass the message along without modifying its contents.

Quote:
Originally Posted by lamletoi View Post
I can not figure out which way to find out the daemons creates these garbled messages.
Maybe that hint of mine was wrong. I just thought these messages came from a program or a script running "underground". I didn't think of it as a hand-typed message.

So it's Vietnamese. Okay, then it's not a surprise that it looks completely alien to me. Probably German would look just as strange to you.

[X] Doc CPU
 
1 members found this post helpful.
Old 06-05-2014, 06:52 PM   #7
lamletoi
Member
 
Registered: Oct 2011
Posts: 46

Original Poster
Rep: Reputation: Disabled
Thanks so much.
The problem has fixed but just a half part of my problem.
Changing the Default Charset in SquirreMail config(./conf.pl) to UTF-8.
Some auto Warnings send directly(Dovecot) to my admin email also has this problem.
I am working around it.

Data saved in config.php
Press enter to continue...
SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Language preferences
1. Default Language : en_US
2. Default Charset : utf-8
3. Enable lossy encoding : false

R Return to Main Menu
C Turn color on
S Save data
Q Quit

Last edited by lamletoi; 06-05-2014 at 07:52 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unicode in c language using eclipse with redhat Linux server 6 parvathi reddy Linux - Newbie 1 03-15-2014 01:26 AM
how to search in files text that is one-byte encoding? (enc. that's not unicode) qdinar Linux - General 4 07-18-2011 03:44 AM
How to create a header file in Unicode codepage -1200 Encoding in linux Mini Singh Linux - General 0 05-25-2007 08:10 AM
Unicode vs. Western Encoding jrdioko Linux - General 0 07-05-2004 08:45 PM
Can't access winxp (unicode) files from linux FTP server... taligent Linux - Networking 1 05-25-2004 12:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration