News:

Download Pelles C here: http://www.pellesc.se

Main Menu

Export C source as HTML or PDF file

Started by Pelle, March 16, 2005, 07:34:45 PM

Previous topic - Next topic

John Z

Hi Robert,

Quote from: Robert on January 23, 2026, 06:03:43 PMMy interest in your resurrection of the Pelles C Export addin is in the "Export to HTML" facility. I think it can handle Unicode identifiers and quotation mark embedded Unicode strings.

Yes - Export to HTML can easily handle UTF-8, I just did a quick update, but it should not take too much to fix it.

Quote from: Robert on January 23, 2026, 06:03:43 PMIf you are interested in developing a Unicode capable "Export to HTML" facility, you might find some help studying the BCX translated C codes of the example on the webpage

No need - I have already previously written as part of another Add-In program (LineCounter+  https://forum.pellesc.de/index.php?topic=10092.0 ) a module that does output a file in UTF-8 HTML.  Since Pelle C now defaults to UTF-8 rather than a codepage it should be even easier.

So - I'll take a look at fixing that part of the Export Add-In.  Attached is an HTML output example from the LineCounter Add-in.

John Z

Like you said previously, optimistically,  "Nothing is impossible."  :)

John Z

Making progress  :)

Some help used from 'vibe' coding too.

Here is the first output trial utf8 source to utf8 html.
More improvements to be done before posting new project files.

So this is just preliminary look.

John Z

TimoVJL

A good thing, that Add-In is still updated  :)
May the source be with you

John Z

Happy to do it.

Here is another output with actual UTF-8 characters :) I realized the first didn't have any 'special' characters.

The version is almost complete.  It also has an optional Dark output mode, and an optional Line Number output mode.  Just removing any nonsense I might have put in.

John Z

John Z

Attached 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


Robert

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

Thank you John Z. An Excellent job done !  ;D  8)