Locales UTF8 - not working

 
Thread Tools Search this Thread
Operating Systems Linux Debian Locales UTF8 - not working
# 8  
Old 06-21-2012
Quote:
Originally Posted by pxb368@motorola
My problem is, I have a script that have a email on it that when a user match a specific query, it sends an e-mail through exim. These e-mail is in Portuguese that is the reason that I'm getting this issue.

Any other ideas?
Thanks for letting us know your actual problem.

The character set of the email has little to do with the character set of the system, by the way. You need to use MIME types to tell the email client the incoming data is UTF8 and not ASCII.
# 9  
Old 06-21-2012
Yes, that is UTF-8.
I changed the locale again and now somethings are working.

Let me try to explain it better.
Right now I have this script:
Code:
...
cat <<EOF > $MESSAGE_FILE
Prezado(a) $NOME,

Usuário: $NAME
Celular : $PHONE
Valor : R$ $VALOR
Mes de Referencia: $REFERENCIA

Você está recebendo esta notificação por estar em desacordo com a política de uso de celulares vigente da XXXX, no Brasil.  
O gasto mensal do seu celular está acima do previsto pela política. 
Sugerimos que abra um chamado no help desk (8080) para que possamos adequar seus planos de voz e /ou dados à sua necessidade.

A política vigente encontra-se na página web:

Atenciosamente,

IT Networks & Telecom

EOF

cat $MESSAGE_FILE | mailx -a "From: notreply@XXXX.com" notreply@XXXX.com -b AAAAA@XXXX.com -s "Uso de Celular Excedido em $REFERENCIA / Cell Phone Use Exceeded in $REFERENCIA"
...

If I create a test file that have the previous text and try the command line to send me the e-mail, the e-mail looks great, however when I run the script, the e-mail that I receive is broken:

Code:
Usuáo:
Celular : Linha
Valor : R$ DDD
Mes de Referencia: Commercial


Vocêstáecebendo esta notificaç por estar em desacordo com a políca
de uso de celulares vigente da XXXXX, no Brasil.  O gasto mensal do seu
celular estácima do previsto pela políca. Sugerimos que abra um chamado
no help desk (8080) para que possamos adequar seus planos de voz e /ou dados
àua necessidade.

Any ideias?
# 10  
Old 06-21-2012
In what way is it 'broken'? I can't see much wrong with it, except the R$, which I don't think ever worked.
This User Gave Thanks to Corona688 For This Post:
# 11  
Old 06-21-2012
some graphic accents are missing, not the "ç" but all the others are.

Should be:
Você está recebendo esta notificação por estar em desacordo com a política de uso de celulares vigente da XXXX, no Brasil.

It is showing in the Inbox of the user:
Vocêstáecebendo esta notificaç por estar em desacordo com a políca de uso de celulares vigente da XXXXX, no Brasil.

The R$ is loaded with the rest of the script. Don't worry about it.
# 12  
Old 06-22-2012
RESOLVED

After the change of the locales the text in the script wasn't fixed so I had to update it manually and after that it worked.

Thank you in advance.
# 13  
Old 12-14-2012
Hammer & Screwdriver

Wow. Feels great to read your blog.Actually I was searching for the same information since many days but todayI am so lucky to land on your page. Thanks again for your hard work.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Setting locales

I'm having a problem with my locale setting. Essentially, when using Xmgrace or Awk, all . are replaced with , leading to wrong arithmetic. Here is an explanation of the problem: awk printing thousands with commas. see LC_ALL=en_US.UTF-8 How can I permanently set the locale... (1 Reply)
Discussion started by: chrisjorg
1 Replies

2. AIX

Locales and conversion tables confusion - Some characters don't get translated

Hello, my program running on AIX receives a message (from MQ) which is in CCSID 870 (LATIN-2 EBCDIC). It needs to convert it to CCSID 912 (ISO-8859-2). For this conversion, it uses the Websphere MQ functionality, but which, according to the manual, uses AIX's system conversion tables. (Btw - it... (1 Reply)
Discussion started by: Adamm
1 Replies

3. Web Development

Detecting browser locales/languages and generating output

We have a Java app that renders Localized text on user's browser session based upon browser language settings. The app reads the browser language settings and prepares the localized text. But recently we faced issues for Mozilla 5.0 version browser. Note our code works fine in IE. Taking an... (1 Reply)
Discussion started by: uunniixx
1 Replies

4. HP-UX

HPUX 10.20 - Warning! One or more of your selected locales are not available.

On our system a user successfully ran the only application on the system this morning. When they tried to login a bit later they could not. The Admin tried to reboot the server and it seemed to reboot ok. When logged in the admin tried to change directories and gets the below message (note they... (1 Reply)
Discussion started by: jmdzied
1 Replies

5. Shell Programming and Scripting

UTF8 encoding

Hi experts, I have a gz file from other system(solaris), which is ftped to our system(solaris). After gunzip, the file is a xml file and we are using ORACLE built in xml transformiing tool ORAXSL to transform XML to TXT. Now the issue is we come accross issue regarding UTF8 as below:... (1 Reply)
Discussion started by: summer_cherry
1 Replies

6. Red Hat

Displaying the available locales in english

Hi, I am developing a program that would ask the user to set the locale. For that, I need to display them to user in plain english. like English(US) English (Uk) depending on the user selection I need to set the locale. Is there a command in redhat linux that would... (1 Reply)
Discussion started by: eamani_sun
1 Replies

7. UNIX for Dummies Questions & Answers

formatting date for different locales

Hi, I need to know 1.the usage of LC_TIME with setlocale(). 2.the usage of getdate() utility I read that date formatting for different languages needs 1.user-supplied template file and 2.DATEMSK environment variable set to path of the template fie. Can anyone pls tell... (2 Replies)
Discussion started by: Aeon
2 Replies

8. AIX

Locales in AIX

Currently we have the following locales installed on two of our servers SERVER-1 $ locale -a C POSIX en_US en_US.8859-15 en_US.ISO8859-1 EN_US EN_US.UTF-8 ZH_CN ZH_CN.UTF-8 HI_IN HI_IN.UTF-8 ko_KR ko_KR.IBM-eucKR zh_TW zh_TW.IBM-eucTW SERVER-2 (0 Replies)
Discussion started by: voorkey
0 Replies

9. UNIX for Advanced & Expert Users

Utf8-utf16

Hi All, When we create a flat file using a PLSQL program , the flat file is being created in UTF8 format.This file has lot of german characters.When we use this file to load data into MS SQL Server, the german characters are coming as junk. When we create a flat file in oracle it is being ... (1 Reply)
Discussion started by: Suppandi
1 Replies

10. UNIX for Dummies Questions & Answers

Locales - Solaris 8

Can anyone tell me the difference between the 2 Locales: North American Partial Locales en_US.ISO8859-1 en_US.ISO8859-15 Does it matter which one to use? What are the differences? Thanks. -I have found the below info but I don't know what it means(Also no RFC# for 8859-15): ... (2 Replies)
Discussion started by: finster
2 Replies
Login or Register to Ask a Question