Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 11-13-2013, 04:03 PM   #1
Registered: Nov 2005
Location: Poland
Distribution: Mint Mate, Ubuntu
Posts: 47

Rep: Reputation: 1
strange filenames encoding in text terninal (tty)

I don't understand my text tty beavior connected to filenames handling.

I play with two locales (properly installed and selected by LANG + all LC_x variables):
pl_PL.UTF-8 and pl_PL.ISO-8859-2

No mater which one I use" gnome terminal seems to behave correctly.

When I use UTF-8 in text tty it behaves correctly too.

By correctly I mean:
creates filenames, lists directories, echoes and cat-s files in proper encoding selected by locale variables

But when I switch into pl_PL.8859-2 text tty goes mad:
Creates files in UTF-8 (touch command)
cat interprets file in 8859-2
echo prints in 8859-2
And ls lists both kind of filenames incorrectly:
these encoded in UTF-8 and these in 8859-2 too!

When I call:
ls >file.txt
cat file.txt
File is printed correctly(!): in 8859-2

So there are two problems:
1) why text tty creates file names with UTF8 ignoring locale?
2) why ls shows all filenames improperly?


p.s: system is ubuntu 12.04

Last edited by froff; 11-13-2013 at 04:16 PM. Reason: p.s.


locale, terminal

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Any SCP client (on Windows/Cygwin) support UTF-8 encoding of filenames? drroot Linux - Software 3 01-04-2011 01:47 PM
Touble with wrong encoding in filenames elektronaut Linux - General 13 09-06-2009 04:20 PM
Grip, if "Allow high bits in filenames" on then there is a problem with encoding. brynjarh Linux - Software 0 10-24-2004 12:44 PM
Linux Terninal Server thejuoos Linux - Networking 0 07-01-2004 12:28 PM

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

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