Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad character encoding in local documentation #1985

Closed
FYHenry opened this issue Jul 23, 2023 · 1 comment
Closed

Bad character encoding in local documentation #1985

FYHenry opened this issue Jul 23, 2023 · 1 comment
Assignees
Labels
bug Unexpected problem or unintended behavior
Milestone

Comments

@FYHenry
Copy link

FYHenry commented Jul 23, 2023

Bug summary

  • Character encoding error int the HTML table elements of the documents.
  • Substitution of any non ASCII character by ? character.

Variables

  • WEB_BROWSER can be a Web browser command like firefox or lynx,
  • DOC_ROOT is the system directory like /usr/share/doc/weechat-doc/html/ in Debian distribution,
  • DOC_PAGE_TITLE is the title part in the file name like weechat_plugin_api in weechat_plugin_api.fr.html,
  • DOC_LANG is the two-characters language code like fr in weechat_plugin_api.fr.html.

Steps to reproduce

1. Run from the shell ${WEB_BROWSER} file://${DOC_ROOT}/${DOC_PAGE_TITLE}.${DOC_LANG}.html
2. Match some word patterns containing ? in the table HTML elements.
3. Repeat the two first operations replacing the Web browser by a text editor like nano to match in the HTML source code.

Current behavior

Some word patterns like the regular expression \W[a-zA-Z0-9]+\?[a-zA-Z0-9]+\W are matched in HTML table cells from the translated documents.

Expected behavior

Some word patterns like the regular expression \W[a-zA-Z0-9]+\D[a-zA-Z0-9]+\W are matched in HTML table cells from the translated documents : the non ASCII characters can appear in the table cells.

Suggested solutions

Modify documents processing for its local version.

Additional information

LANG = fr_FR.UTF-8


  • WeeChat version: 4.0.2
  • OS, distribution and version: Debian 11 GNU/Linux Bullseye (x86_64)
  • Terminal: Gnome Terminal
  • Terminal multiplexer (screen/tmux/…/none): None
@FYHenry FYHenry added the bug Unexpected problem or unintended behavior label Jul 23, 2023
@flashcode flashcode self-assigned this Jul 31, 2023
@flashcode flashcode added this to the 4.0.3 milestone Jul 31, 2023
flashcode added a commit that referenced this issue Jul 31, 2023
@flashcode
Copy link
Member

The fix made is just a warning about missing locales when doc is built, with a fallback to English locale if a locale is missing.

This will just use English, but the real fix for French docs is to install all locales before building them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants