[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: multibyte support for ansic_* functions
From: |
Roman Rakus |
Subject: |
Re: multibyte support for ansic_* functions |
Date: |
Tue, 16 Aug 2011 16:29:36 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0 |
On 08/16/2011 03:42 PM, Roman Rakus wrote:
The following two patches add support for multibyte characters in ansic_*
functions. Effectively it is changing behaviour of:
1) printf's %q format option
2) command not found error message
3) readline's syntax error message
4) XTRACE output
It's a set of two patches.
Few more words;
Patches should clearly apply to bash 4.2 with patchlevel 10.
The problem is with locale specific multibyte characters.
ad 1) User can run command `smůla' (Czech word for bad luck) and bash
will report:
bash: $'sm\305\257la': command not found
With first patch, it will report:
bash: smůla: command not found
The situation is even worse when you use only non-latin characters.
The second patch handles also situations when word contains
non-printable characters. For example `"smůla "' (tab after).
I think it will improve look and feel. At least calling isprint()
function on multibyte characters isn't valid.
RR