Locales UTF8 - not working

 
Thread Tools Search this Thread
Operating Systems Linux Debian Locales UTF8 - not working
# 1  
Old 06-20-2012
Question Locales UTF8 - not working

Hello,

I'm facing a strange problem in one of my Debian server, what is happening right now it that I have runned dpkg-reconfigure locales to set en_US UTF-8 so in that way I could use accentuation in my system.

Code:
# locale -a
C
en_US.utf8
POSIX
pt_BR.utf8

However, when I create a new file via console like vi test and I try to use "ç" or "é" for example the char is broken.

Any ideas?Smilie
# 2  
Old 06-20-2012
The terminal has to support UTF8, too. What terminal are you using?
# 3  
Old 06-20-2012
putty, however if I write "é" in the shell, it works, if I use echo "é" > test and cat test it works but if I do vi test and try "é" it fails.

Code:
# locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

# 4  
Old 06-20-2012
What version of vi?
# 5  
Old 06-20-2012
In vi, do:
Code:
:set encoding=utf8

# 6  
Old 06-21-2012
Code:
# vi --version
VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Jul 12 2010 12:49:33)
Included patches: 1-445

I did the
Code:
:set encoding=utf8

however that didn't work, 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?
# 7  
Old 06-21-2012
Did you check your putty setting under "window -> translation -> remote character set"?
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