purebasic icon indicating copy to clipboard operation
purebasic copied to clipboard

PB Help for "Residents" Omits Mentioning Prototypes

Open tajmone opened this issue 5 years ago • 3 comments

Update PureBasic Help for "Residents", mentioning Prototypes among the list of allowed items:


The PureBasic documentation on Residents omits Prototypes from the list of allowed items in resident files — it only mentions structures, interfaces, macros and constants:

tajmone avatar Dec 07 '20 03:12 tajmone

I want to update the French version however GitHub show me this warning :

We’ve detected the file encoding as ISO-8859-1. When you commit changes we will transcode it to UTF-8.

If i select preview it show changes for all theses characters: 'à', 'é', 'ê', 'è'. Is it safe to convert texts files from ISO-8859-1to UTF-8 (in a separate PR) ? Or should I make the change in a way that don't change encoding ?

Naheulf avatar Feb 22 '21 17:02 Naheulf

I want to update the French version however GitHub show me this warning :

We’ve detected the file encoding as ISO-8859-1. When you commit changes we will transcode it to UTF-8.

I wasn't aware of this issue, possibly is a GitHub specific warning for Git itself doesn't care about encoding, and I didn't experience any encoding problems when editing the docs sources — i.e. I've edited them as they were.

When I open the English version of residents.txt in my editor, it tells me it's encoded as UTF-8. But if I open the French version it tells me it's in Windows 1252, so probably that file got mis-encoded along the line at some point.

If i select preview it show changes for all theses characters: 'à', 'é', 'ê', 'è'. Is it safe to convert texts files from ISO-8859-1to UTF-8 (in a separate PR) ? Or should I make the change in a way that don't change encoding ?

My guess is yes, it should be safe, but keep an eye open for those characters which are differently encoded between ISO-8859-1 and UTF-8 (i.e. any char above 127), but there shouldn't be many of these anyhow.

Also, you can always (and in this case, probably should) preview the HTML documentation locally.

I've added a batch script for Windows, Documentation/HTML-BUILD.bat, which allows to build the docs in the repository without affecting its status (the built HTML files will be ignored), so you can use that if you're using Windows, or create a similar script if using another OS (and then add it to the repository via PR, so others can use it too).

(See #135) ~~After you've converted the source to UTF-8, and confirming that all went well and that the doc still build correctly, we should probably create a separate Issue and schedule to convert to UTF-8 any other source docs which are in different encodings.~~

tajmone avatar Feb 22 '21 21:02 tajmone

@Naheulf, after having run some tests on the source in all three language folders (see #135 for details) I'm starting to doubt that these sources are UTF-8.

It just happens that the English docs are both valid UTF-8 and ISO-8859-1 in most cases, due to their scarce use of special characters. For German and French, a very high number of sources (90-98%) didn't pass the UTF-8 validation test, which seems to confirm my doubt.

In #135 you'll also find my comments regarding the potential problems that can be encountered working with ISO-encoded sources with Git, and using a generic extension like .txt (which most editors will associate with UTF-8 by default).

tajmone avatar Feb 23 '21 02:02 tajmone