Giter Site home page Giter Site logo

Comments (4)

shimizukawa avatar shimizukawa commented on August 17, 2024

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.

shimizukawa avatar shimizukawa commented on August 17, 2024

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.

shimizukawa avatar shimizukawa commented on August 17, 2024

From Anonymous on 2009-03-11 16:16:01+00:00

Bump!

from sphinx.

shimizukawa avatar shimizukawa commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.