LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 06-22-2013, 03:41 PM   #1
fl0
Member
 
Registered: May 2010
Location: Germany
Distribution: Slackware
Posts: 105

Rep: Reputation: 34
Unicode Problems?


Hi,

i use slackware64-current, and have activated unicode,

i set the parameter in /etc/profile.d/lang.sh and in lilo.conf

Code:
export LANG=en_US.UTF-8
Code:
append=" vt.default_utf8=1 resume=/dev/cryptvg/swap"
if i use vim and try german umlaute (äöü..), it works, but if i try this in the terminal (urxvt), the umlaut is displayed but in the error its not.
Code:
[trav ~]$ ä
bash: $'\303\244': command not found
[trav ~]$
a touch ä is working

ideas? or is this the normal behavior?

Last edited by fl0; 06-22-2013 at 03:45 PM.
 
Old 06-22-2013, 05:15 PM   #2
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware 14.0/32bit + Xmonad
Posts: 280

Rep: Reputation: 74
I have the same set-up as you (except I don't know what "resume=/dev/cryptvg/swap" is supposed to do, even though I have luks+lvm going...)

I use urxvt, and have the same result with the error output. It occurred to me that this looks like a "command interpreter" issue, so I installed dash from slackbuilds, and "switching" to dash from within urxvt I get:
Code:
$ ä                       
dash: ä: not found
$
so I'm thinking it's a bash limitation. I take it dash is supposed to be fully POSIX, whereas bash may not be?
Here's another fun one:
Code:
$ イロハニホヘト
dash: イロハニホヘト: not found
$
Maybe the POSIX thing is the explanation, but I'm now at the limit of my pay scale.
 
Old 06-22-2013, 05:24 PM   #3
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,661

Rep: Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236
Not sure I understand what you mean.

I just built and installed an rxvt-unicode (AKA urxvt) package from slackbuilds.org and when using the basic method for applying ISO 14755 standard (press and hold both Ctrl and Shfi then enter the four hex digits of UTF-8 code), characters are properly displayed.

FYI, to find all hex digits UTF-8 codes of letters with a diaeresis (official name of the umlaute) I type:
Code:
 zgrep DIAERESIS /usr/share/i18n/charmaps/UTF-8.gz
EDIT Reading STDOUBT's answer I see now that I didn't understand your question. So yes, this could be a limitation of bash.

Oh, and bash can be put in POSIX mode if invoked with the --posix option. According to 'man bash': "Bash can be configured to be POSIX-conformant by default".

But that doesn't change the output in this case.

Last edited by Didier Spaier; 06-22-2013 at 05:40 PM. Reason: EDIT added
 
Old 06-22-2013, 11:18 PM   #4
mancha
Member
 
Registered: Aug 2012
Posts: 362

Rep: Reputation: Disabled
I rescued and refactored a pearl from Roman Rakus at Red Hat. It applies cleanly to Bash 4.2
and on my systems modifies the behavior you noted.

Feel free to get bash-4.2-widechars.diff and stress test it (other testers welcome).

If all goes well, Pat might consider its inclusion.

--mancha

Code:
mancha@infinity:~$ müßiggänger
-bash: müßiggänger: command not found
 
3 members found this post helpful.
Old 06-22-2013, 11:26 PM   #5
zakame
Member
 
Registered: Apr 2012
Distribution: Debian, Ubuntu, Slackware
Posts: 134

Rep: Reputation: 53
Yep, looks like a bash regression. dash, and zsh displays it fine. ash also fails it, not even accepting characters in the command line:

Code:
zakame@jazz:~% /bin/ash
%n@%m:%~%# miggnger         # should be müßiggänger here
miggnger: not found
%n@%m:%~%#
 
Old 06-23-2013, 03:45 AM   #6
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 353

Rep: Reputation: 56
strange, i'm on -current (almost on the latest commit) and i get

Code:
mar@arnold$ echo "echo Müßiggänger" > ä
mar@arnold$ ll
total 4
drwxr-xr-x  2 mar  users  60 Jun 23 09:43 ./
drwxrwxrwt 20 root root  440 Jun 23 09:42 ../
-rw-r--r--  1 mar  users  20 Jun 23 09:43 ä
mar@arnold$ ä
bash: ./ä: Permission denied
mar@arnold$ chmod 755 ä
mar@arnold$ ä
Müßiggänger
Edit: using Terminal

Last edited by Martinus2u; 06-23-2013 at 03:46 AM.
 
Old 06-23-2013, 04:28 AM   #7
mancha
Member
 
Registered: Aug 2012
Posts: 362

Rep: Reputation: Disabled
Quote:
Originally Posted by Martinus2u View Post
strange, i'm on -current (almost on the latest commit) and i get

Code:
mar@arnold$ echo "echo Müßiggänger" > ä
mar@arnold$ ll
total 4
drwxr-xr-x  2 mar  users  60 Jun 23 09:43 ./
drwxrwxrwt 20 root root  440 Jun 23 09:42 ../
-rw-r--r--  1 mar  users  20 Jun 23 09:43 ä
mar@arnold$ ä
bash: ./ä: Permission denied
mar@arnold$ chmod 755 ä
mar@arnold$ ä
Müßiggänger
Edit: using Terminal
That isn't what is being reported/corrected in this thread.
 
Old 06-23-2013, 04:29 AM   #8
fl0
Member
 
Registered: May 2010
Location: Germany
Distribution: Slackware
Posts: 105

Original Poster
Rep: Reputation: 34
Quote:
Originally Posted by mancha+ View Post
I rescued and refactored a pearl from Roman Rakus at Red Hat. It applies cleanly to Bash 4.2
and on my systems modifies the behavior you noted.

Feel free to get bash-4.2-widechars.diff and stress test it (other testers welcome).

If all goes well, Pat might consider its inclusion.

--mancha

Code:
mancha@infinity:~$ müßiggänger
-bash: müßiggänger: command not found
Hi @mancha,

thx for the patch, it applies also cleanly and solves the problem, no negative effects for now
Code:
[trav bash]$ möäüß
bash: möäüß: command not found
[trav bash]$

@STDOUBT
Code:
resume=/dev/cryptvg/swap
is needed to hibernate the system, the kernel needs to know the resume location
fl0

Last edited by fl0; 06-23-2013 at 04:33 AM.
 
Old 06-23-2013, 04:45 AM   #9
STDOUBT
Member
 
Registered: May 2010
Location: Stumptown
Distribution: Slackware 14.0/32bit + Xmonad
Posts: 280

Rep: Reputation: 74
Quote:
Originally Posted by fl0 View Post
@STDOUBT
Code:
resume=/dev/cryptvg/swap
is needed to hibernate the system, the kernel needs to know the resume location
fl0
Oh, I see. I didn't read that part of README_CRYPT.TXT since I always suspend to RAM.
Thanks for pointing it out!
 
Old 06-23-2013, 08:02 AM   #10
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,661

Rep: Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236Reputation: 1236
I confirm that here (Slackware-14.0), patch linked to by mancha+ in post #4 solves issue raised by fl0, using urxvt provided by slackuilds.org.

I didn't make any other tests so I can't tell if applying this patch has any other effect.

Anyway I will use this new bash version from now and will report anything weird I can notice.

Last edited by Didier Spaier; 06-29-2013 at 11:45 AM. Reason: typo corrected
 
Old 06-23-2013, 11:29 AM   #11
yars
Member
 
Registered: Apr 2012
Location: Russia
Distribution: Slackware
Posts: 137

Rep: Reputation: 13
I know about these. This is a bug in Bash, because of which the UTF-8 strings are handled incorrectly. I is not a programmer and don't know how to fix it nicely.
 
1 members found this post helpful.
Old 06-23-2013, 12:12 PM   #12
Martinus2u
Member
 
Registered: Apr 2010
Distribution: Slackware
Posts: 353

Rep: Reputation: 56
Quote:
Originally Posted by mancha+ View Post
That isn't what is being reported/corrected in this thread.
ooops, you're right. it was "command not found", not "permission denied". sorry for the mixup.
 
Old 06-29-2013, 11:25 AM   #13
fl0
Member
 
Registered: May 2010
Location: Germany
Distribution: Slackware
Posts: 105

Original Poster
Rep: Reputation: 34
ok i have used the patched version as my working version , no problems so far.

@Pat
can you include the patch?

regards fl0
 
Old 06-30-2013, 12:48 AM   #14
yars
Member
 
Registered: Apr 2012
Location: Russia
Distribution: Slackware
Posts: 137

Rep: Reputation: 13
Quote:
Originally Posted by fl0 View Post
ok i have used the patched version as my working version , no problems so far.
Confirmed, I rebuilt bash with these patch, and it works fine.
@mancha:
Thanks for patch!
 
  


Reply


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
[SOLVED] Problem displaying Unicode special characters in Urxvt/rxvt-unicode terminal shahinism Slackware 4 10-22-2012 04:08 PM
Moving text files between Windows and Linux: Unicode and "executable" problems AchubaNanoiaBR Linux - Newbie 2 07-04-2009 05:15 PM
unicode problems in console? numbers instead of folder names nass Slackware 4 10-09-2008 03:08 PM
Problems with unicode. thekillerbean Linux - General 1 02-16-2007 02:17 PM
Mandrake 9.1 and Unicode : problems bikerinsf Linux - Distributions 0 05-29-2003 02:12 AM


All times are GMT -5. The time now is 10:10 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration