Monday Jan 23, 2012

Character encoding de_DE on Linux Debian

On my debian server today I run into a problem with the encoding of XSL templates running on a GlassFish server. The problem was that German characters where not displayed correctly.

After a long time of searching, I figured out that the reason for that problem was not my MySQL database, nor my GlassFish installation. It was simply the missing German language support on my linux debian.

You can test the installed locales with the following command:

locale -a

In my case only 'en_US.utf8' was listed.

In debian you can simply add the german language support by changing the file /etc/locale.gen. Simply uncomment the lines:

de_DE ISO-8859-1
de_DE.UTF-8 UTF-8
de_DE@euro ISO-8859-15

and run the command:

locale-gen

After restarting my GlassFish server the xsl transformation works fine with german characters.

The command "locale -a" now displays the following locale:

C
de_DE
de_DE@euro
de_DE.iso88591
de_DE.iso885915@euro
de_DE.utf8
deutsch
en_US.utf8
german
POSIX

 



Friday Feb 27, 2009

postfix and no worthy mechs found

Today I configured postfix on my unbutu machine to test some improvements sending out mails to a smtp mail server.

I followed this introductions: 

http://wiki.ubuntuusers.de/Postfix

My smtp server / relayhost needs an authentification. So I configured my main.cf with the following smtp params:

smtp_sasl_auth_enable = yes
# noplaintext weglassen, wenn Passwörter im Klartext übertragen werden müssen:
# (nicht empfohlen, nur wenn's anders nicht funktioniert)
smtp_sasl_security_options = noplaintext noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password

But now I received the following error message on my mail.log

Feb 28 00:25:44 xxx postfix/smtp[8756]: warning: SASL authentication failure: No worthy mechs found
Feb 28 00:25:44 xxx postfix/smtp[8756]: 2794717E510: to=<xxa@xx.com>, relay=www.xxx.com[xxxxxxx]:25, delay=21, delays=0.05/0.01/21/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server xxx[xxx]: no mechanism available)

To solve this problem I found this thread:

http://www.zimbra.com/forums/installation/1240-cannot-sasl-authenticate-server.html

So the solution for me was to set the following two smtp params to an empty string:

smtp_sasl_security_options =
smtp_sasl_mechanism_filter =
smtp_use_tls = no

Now postfix works fine and is able to send out mails to my relayhost.