Comments (4)
From Georg Brandl on 2008-11-16 09:50:04+00:00
I agree that this must be fixed. However, with quick googling I couldn't find information on how to specify the encoding of the .hhp file, so I'll need to experiment with HTML Help Workshop a bit once I have a Windows machine ready.
from sphinx.
From Petro Sasnyk on 2008-11-17 14:41:37+00:00
In general HTML help didn't support Unicode http://support.microsoft.com/kb/269766.
In this case projects .hpp file, indexes and topic names can cause the problems.
I see one way to eliminate this.
Add additional output option to htmlhelp output, for example for target encoding. In this case we try to make encoding for example from uft8 to cp1251, for parts that didn't support unicode.
At this time I make quick fix only for project name.
The fix consists from two parts:
- First, we should unlock hardcoded Language in project_template variable
{{{
#!python
project_template = '''
[OPTIONS]
Binary TOC=Yes
Compiled file=%(outname)s.chm
Contents file=%(outname)s.hhc
Default Window=%(outname)s
Default topic=index.html
Display compile progress=No
Full text search stop list file=%(outname)s.stp
Full-text search=Yes
Index file=%(outname)s.hhk
Language=%(language_code)s
Title=%(title)s
}}}
In this case compiler can select correct fonts.
- second:
{{{
#!python
import codecs
....
builder.info('writing project file...')
f = codecs.open(path.join(outdir, outname+'.hhp'), 'w', encoding = 'cp1251' )
try:
f.write(project_template % {'outname': outname,
'title': builder.config.html_title,
'version': builder.config.version,
'project': builder.config.project,
'language_code': '0x422'} )
.....
builder.info('writing TOC file...')
f = codecs.open(path.join(outdir, outname+'.hhc'), 'w', encoding = 'cp1251')
try:
}}}
In this case we didn't receive Exception in case if we nonASCII-letter in project name used.
I think for this case we need at least two additional html help options. hthmhelp_output_encoding - encoding of topic names, indexes and project name. hthmhelp_language - laguage code for project.
I'll try to add this option by without assistance, but i didn't understand how I should modify quickstart.py.
At htmlhelp.py attachment my quick and dirty fix.
After fixing first issue, still remain problem with wrong topic titles recoding in TOC, I still working on workaround with it.
from sphinx.
From Anonymous on 2009-03-11 16:16:01+00:00
Bump!
from sphinx.
From Georg Brandl on 2009-07-09 10:16:12+00:00
This is now fixed by the patch from <<issue 208>>.
from sphinx.
Related Issues (20)
- Import command-line documentation from docopt HOT 2
- Add "skip to main content" a11y feature
- BUG: env.toctree_includes different between parallel and serial builds HOT 2
- LaTeX: for French language and lualatex engine polyglossia and not babel is used contrarily to Sphinx documentation HOT 1
- [docs] clarify the usage of `versionadded` & co HOT 9
- Re: :scale: for SVG images in HTML builds
- sphinx raises an exception when trying to build python 3.13 doc with devhelp HOT 3
- Yandex Browser ignores the translation ban HOT 1
- Issue with automodule and cython/numpy HOT 2
- TypeError: expected str, bytes or os.PathLike object, not StringList HOT 7
- test_autodoc_type_aliases failing on 3.12.4 HOT 3
- error on http link containing a dash with sphinx book/pydata theme HOT 4
- Make complex setting values like latex_documents overridable HOT 2
- cannot show image correctly in figure HOT 5
- CI: GitHub Actions: Modification condition for JS test directories seems to be too precise. HOT 1
- Config: support unicode en-dash (codepoint 8211) during copyright year substitution. HOT 4
- [config] Support more configurable/precise build-year copyright substitution. HOT 9
- Strict type of `linkcheck_rate_limit_timeout`
- `autosummary` ignores `__all__` when it is empty HOT 1
- Use a dataclass for extension metadata HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sphinx.