[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Patch for unicode in varnames...
From: |
Chet Ramey |
Subject: |
Re: Patch for unicode in varnames... |
Date: |
Tue, 13 Jun 2017 15:40:26 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 |
On 6/5/17 6:39 PM, George wrote:
> If Bash did go the route of using the locale to set the character encoding of
> a script, I think it would be best to have a mechanism a script can use
> to define the character encoding for the whole script file up front, rather
> than setting LC_CTYPE to procedurally change the behavior of the shell.
A script can use an assignment to LC_CTYPE (or LC_ALL, or LANG) at the
beginning of a script to "define the character encoding for the whole
script file up front."
Doing this with "source" is a little more problematic, because
fundamentally shell variable names are simply strings of bytes. If you
change the locale between defining a shell variable and referencing it,
possibly multiple times, you're going to have a character set problem.
There are tools like iconv that can help you with that, but that's a
clumsy solution.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/
- Re: Patch for unicode in varnames..., (continued)
- Re: Patch for unicode in varnames..., George, 2017/06/07
- Re: Patch for unicode in varnames..., Dethrophes, 2017/06/07
- Re: Patch for unicode in varnames..., Peter & Kelly Passchier, 2017/06/07
- Re: Patch for unicode in varnames..., L A Walsh, 2017/06/09
- Re: Patch for unicode in varnames..., Chet Ramey, 2017/06/13
- Re: Patch for unicode in varnames..., Peter & Kelly Passchier, 2017/06/05
- Re: Patch for unicode in varnames..., Chet Ramey, 2017/06/13
- Re: Patch for unicode in varnames...,
Chet Ramey <=
- Re: Patch for unicode in varnames..., dualbus, 2017/06/05
- Re: Patch for unicode in varnames..., Chet Ramey, 2017/06/13
- Re: Patch for unicode in varnames..., Chet Ramey, 2017/06/13
- Re: Patch for unicode in varnames..., Eduardo Bustamante, 2017/06/15
- Re: RFE: Please allow unicode ID chars in identifiers, Chet Ramey, 2017/06/13
- Re: RFE: Please allow unicode ID chars in identifiers, Chet Ramey, 2017/06/13
- Re: RFE: Please allow unicode ID chars in identifiers, tetsujin, 2017/06/13
- Re: RFE: Please allow unicode ID chars in identifiers, Chet Ramey, 2017/06/13
- Re: RFE: Please allow unicode ID chars in identifiers, Chet Ramey, 2017/06/13
- Re: RFE: Please allow unicode ID chars in identifiers, tetsujin, 2017/06/02