Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Always write UTF8 to the console. Change the console output mode on windows to UTF8 at startup. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | windows-i18n |
| Files: | files | file ages | folders |
| SHA1: |
ab934c6b09fd1d5d4a32e50226313012 |
| User & Date: | drh 2011-05-10 13:29:54.772 |
References
|
2011-05-12
| ||
| 12:13 | Back out the [ab934c6b09fd1d5] change. Do not change the console output mode using SetConsoleOutputCP(). Go back to converting UTF8 into MBCS upon output. ... (check-in: b33032ae40 user: drh tags: windows-i18n) | |
Context
|
2011-05-10
| ||
| 13:38 | Translate check-in comments received from console input from MBCS into UTF8. ... (check-in: 2278ef0ffa user: drh tags: windows-i18n) | |
| 13:29 | Always write UTF8 to the console. Change the console output mode on windows to UTF8 at startup. ... (check-in: ab934c6b09 user: drh tags: windows-i18n) | |
|
2011-05-09
| ||
| 15:50 | Pull the latest trunk changes over into the windows-i18n branch. ... (check-in: bbba160840 user: drh tags: windows-i18n) | |
Changes
Changes to src/config.h.
| ︙ | ︙ | |||
121 122 123 124 125 126 127 | # define FOSSIL_INT_TO_PTR(X) ((void*)&((char*)0)[X]) # define FOSSIL_PTR_TO_INT(X) ((int)(((char*)X)-(char*)0)) #else /* Generates a warning - but it always works */ # define FOSSIL_INT_TO_PTR(X) ((void*)(X)) # define FOSSIL_PTR_TO_INT(X) ((int)(X)) #endif | < < < < < < < < < < < < < < < | 121 122 123 124 125 126 127 128 | # define FOSSIL_INT_TO_PTR(X) ((void*)&((char*)0)[X]) # define FOSSIL_PTR_TO_INT(X) ((int)(((char*)X)-(char*)0)) #else /* Generates a warning - but it always works */ # define FOSSIL_INT_TO_PTR(X) ((void*)(X)) # define FOSSIL_PTR_TO_INT(X) ((int)(X)) #endif #endif /* _RC_COMPILE_ */ |
Changes to src/main.c.
| ︙ | ︙ | |||
21 22 23 24 25 26 27 28 29 30 31 32 33 34 | #include "config.h" #include "main.h" #include <string.h> #include <time.h> #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> #if INTERFACE /* ** Number of elements in an array */ | > > > | 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #include "config.h" #include "main.h" #include <string.h> #include <time.h> #include <fcntl.h> #include <sys/types.h> #include <sys/stat.h> #ifdef _WIN32 #include <windows.h> #endif #if INTERFACE /* ** Number of elements in an array */ |
| ︙ | ︙ | |||
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 |
int rc;
int i;
sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
g.now = time(0);
g.argc = argc;
g.argv = argv;
for(i=0; i<argc; i++) g.argv[i] = fossil_mbcs_to_utf8(argv[i]);
if( getenv("GATEWAY_INTERFACE")!=0 && !find_option("nocgi", 0, 0)){
zCmdName = "cgi";
}else if( argc<2 ){
fossil_fatal("Usage: %s COMMAND ...\n"
"\"%s help\" for a list of available commands\n"
"\"%s help COMMAND\" for specific details\n",
argv[0], argv[0], argv[0]);
| > > > | 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
int rc;
int i;
sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);
g.now = time(0);
g.argc = argc;
g.argv = argv;
#if defined(_WIN32)
for(i=0; i<argc; i++) g.argv[i] = fossil_mbcs_to_utf8(argv[i]);
SetConsoleOutputCP(65001);
#endif
if( getenv("GATEWAY_INTERFACE")!=0 && !find_option("nocgi", 0, 0)){
zCmdName = "cgi";
}else if( argc<2 ){
fossil_fatal("Usage: %s COMMAND ...\n"
"\"%s help\" for a list of available commands\n"
"\"%s help COMMAND\" for specific details\n",
argv[0], argv[0], argv[0]);
|
| ︙ | ︙ |
Changes to src/printf.c.
| ︙ | ︙ | |||
804 805 806 807 808 809 810 |
** Write to standard output or standard error.
**
** On windows, transform the output into the current terminal encoding
** if the output is going to the screen. If output is redirected into
** a file, no translation occurs. No translation ever occurs on unix.
*/
void fossil_puts(const char *z, int toStdErr){
| < < < < < < < < < < < < < < < < | 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 |
** Write to standard output or standard error.
**
** On windows, transform the output into the current terminal encoding
** if the output is going to the screen. If output is redirected into
** a file, no translation occurs. No translation ever occurs on unix.
*/
void fossil_puts(const char *z, int toStdErr){
fwrite(z, 1, strlen(z), toStdErr ? stderr : stdout);
}
/*
** Write output for user consumption. If g.cgiOutput is enabled, then
** send the output as part of the CGI reply. If g.cgiOutput is false,
** then write on standard output.
*/
|
| ︙ | ︙ |