Download Pelles C here: http://www.pellesc.se
Quote from: John Z on January 31, 2026, 05:21:03 PMAttached is what I'm calling version 1.3.
It adds the ability to export an UTF encoded source file into an UTF encoded html file.
It supports color coding. If unwanted, change the colors in the source to black.
It supports output with line numbers added, if wanted.
It supports Dark background output, if wanted. (don't use black characters then)
It will partially work for UTF16le but I didn't try any characters unique to UTF16le (maybe later) as UTF-8 was the focus.
All sources included in the project zip as usual.
A Dark Mode with Line Numbers example is attached too.
Check the readme file for more information.
Done...
John Z
\PellesC\bin\polib /OUT:msvcrt.lib /MACHINE:x86 C:\Windows\System32\msvcrt.dll#include <stdio.h>
extern int _putws(const wchar_t *str);
int main(void)
{
_putws(L"This is a _putws test.");
return 0;
}O:\Sources\test2\test2.c(21): warning #2018: Undeclared function '_putts' (did you mean: fputws?); assuming 'extern' returning 'int'.
_putts(_T("Hello World"));
#define _UNICODE
#define WORKAROUND
#undef WORKAROUND
#include <stdio.h>
#include <tchar.h> // missing _putts() (and _putws)
#if defined WORKAROUND
/* function _putws() missed although */
# if defined _UNICODE
# define _putws(s) {_fputts((s), stdout); _fputts(_T("\n"), stdout); }
# define _putts(s) _putws(s)
# else
# define _putts(s) puts(s)
# endif
#endif
int main(void)
{
_putts(_T("Hello World"));
}
include VarBstrFromR4.inc
.data
f REAL4 3.14
.data?
output dd ?
buffer db 8 dup(?)
.code
start:
invoke VarBstrFromR4,f,0,0,ADDR output
xor eax,eax
invoke WideCharToMultiByte,CP_ACP,eax,\
output,-1,ADDR buffer,\
8,eax,eax
invoke StdOut,ADDR buffer
invoke SysFreeString,output
invoke ExitProcess,0
.
.
)
I realized the first didn't have any 'special' characters.
Page created in 0.054 seconds with 15 queries.