diff options
author | jilles <jilles@FreeBSD.org> | 2011-05-08 17:40:10 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2011-05-08 17:40:10 +0000 |
commit | c9be2081e05e10ddab3dcb7fe31efcc981524e18 (patch) | |
tree | e90b9f059591317bfa02d51bd83a0cf89ad9f520 /bin/sh/var.h | |
parent | bf0e27838c7f0e2558fb05339e6f8b74848281c9 (diff) | |
download | FreeBSD-src-c9be2081e05e10ddab3dcb7fe31efcc981524e18.zip FreeBSD-src-c9be2081e05e10ddab3dcb7fe31efcc981524e18.tar.gz |
sh: Add \u/\U support (in $'...') for UTF-8.
Because we have no iconv in base, support for other charsets is not
possible.
Note that \u/\U are processed using the locale that was active when the
shell started. This is necessary to avoid behaviour that depends on the
parse/execute split (for example when placing braces around an entire
script). Therefore, UTF-8 encoding is implemented manually.
Diffstat (limited to 'bin/sh/var.h')
-rw-r--r-- | bin/sh/var.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/sh/var.h b/bin/sh/var.h index 323ddc2..ff21c7d 100644 --- a/bin/sh/var.h +++ b/bin/sh/var.h @@ -83,6 +83,8 @@ extern struct var vterm; #endif extern int localeisutf8; +/* The parser uses the locale that was in effect at startup. */ +extern int initial_localeisutf8; /* * The following macros access the values of the above variables. @@ -116,6 +118,7 @@ char *bltinlookup(const char *, int); void bltinsetlocale(void); void bltinunsetlocale(void); void updatecharset(void); +void initcharset(void); char **environment(void); int showvarscmd(int, char **); int exportcmd(int, char **); |