diff options
| author | Simon Tatham <anakin@pobox.com> | 2004-04-22 17:27:05 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2004-04-22 17:27:05 +0000 |
| commit | 55cf0a663723f6334b94de297776756b487c2cdf (patch) | |
| tree | 0ce89f99734e930c9324211811c6ecef915bebe3 /main.c | |
| parent | 2dfa498f92369018c3bbc1527df8cce5778fc6ae (diff) | |
| download | halibut-55cf0a663723f6334b94de297776756b487c2cdf.zip halibut-55cf0a663723f6334b94de297776756b487c2cdf.tar.gz halibut-55cf0a663723f6334b94de297776756b487c2cdf.tar.bz2 halibut-55cf0a663723f6334b94de297776756b487c2cdf.tar.xz | |
Support the locale-supplied character set where appropriate. It's
used for converting command-line -C directives into Unicode; it's
used for outputting Unicode strings to stderr in error messages; and
it's used as the default character set for input files (although I'd
be inclined to recommend everyone use \cfg{input-charset} in all
their source files to ensure their portability).
[originally from svn r4114]
Diffstat (limited to '')
| -rw-r--r-- | main.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -3,6 +3,7 @@ */ #include <assert.h> +#include <locale.h> #include <stdio.h> #include <stdlib.h> #include "halibut.h" @@ -48,6 +49,8 @@ int main(int argc, char **argv) { paragraph *cfg, *cfg_tail; void *pre_backend_data[16]; + setlocale(LC_ALL, ""); + /* * Set up initial (default) parameters. */ @@ -260,7 +263,7 @@ int main(int argc, char **argv) { in.pushback = NULL; in.reportcols = reportcols; in.stack = NULL; - in.defcharset = CS_ASCII; + in.defcharset = locale_charset(); idx = make_index(); |