Brewtarget / brewtarget

Main brewtarget source code repository.
GNU General Public License v3.0
312 stars 134 forks source link

HTML and XML files. #646

Closed ghost closed 1 year ago

ghost commented 2 years ago

Hello :)

  1. Export recipes to a file HTML doesn't work completely.
  2. Exported XML files are encoded in ISO-8859-1 by default, which results in incorrect display of recipe names for non-English users, which I am. Life would be simpler if xml files were encoded in utf-8 by default. No more question marks in recipe names.

Regards

matty0ung commented 2 years ago

Hi there,

If you could give us some more details on 1 (eg sample recipe where you are seeing problems), then we can gladly take a look. (I couldn't spot any obvious problems when I exported a trivial recipe, but maybe I didn't have enough ingredients in it.)

For 2, I'm afraid the character encoding is part of the BeerXML spec - in other words, switching to UTF-8 would make us less compliant with the standard (albeit that the BeerXML standard is flawed in many ways). We had some longer discussion about this in https://github.com/Brewtarget/brewtarget/issues/624 but the short answer is that we are working on support for BeerJSON, which is a better file format that fully supports UTF-8.

ghost commented 2 years ago

If I right-click on any recipe and select export to HTML nothing happens, no window pops up, no error message, again nothinghappens. For me, exporting to html is a fictitious feature that does nothing. Probably (100%) it's the fault of my own compilation (linux64,git). I can always choose export to xml, it works. I'll wait for BeerJSON version of BT. As usual, thank you for response and patience.

matty0ung commented 2 years ago

Ah, yes, I see what you mean.

There is a new way to export to HTML (courtesy of @mattiasmaahl) which means that, instead of "Export to HTML" you go to "Print and preview" and, from there, you have the option to save as HTML.

So, we need to get rid of that right-click menu option, which, as you've spotted, doesn't do anything (most probably because it's trying to trigger the old code that got replaced) and, probably, add "Print and preview" as an option on the right-click menu instead.

I'll re-open this ticket so we've got something to remind us to make the fix. Thanks for the spot!

matty0ung commented 1 year ago

I believe the right-click "export to HTML" has now been removed - at least I didn't see it in a quick look on the 3.0 release. As ever, please reopen if I'm mistaken.