Comments (4)
Hi,
I tried the following test document:
TITLE: Sustentação
AUTHOR: Sustentação
DATE: today
We write some unicode: Sustentação.
and compiled it to plain html, Bootstrap html, and reveal.js beige slides html:
doconce format html test3 --encoding=utf-8
doconce format html test3 --encoding=utf-8 --html_style=bootstrap
doconce slides_html test3 reveal --html_slide_theme=beige
The title comes out right in all cases.
The problem is probably that you did not include --encoding=utf-8
. It should be an error message telling this (usually it is but not for unicode in the title), but now there is 😃
from doconce.
Thank you for the fast answer. A make a new test, called test.do.txt:
TITLE: Sustentação
AUTHOR: Marcos Lourenço
DATE: Sexta, 12 de junho de 2015
!split
===== Test unicode Ação =====
!bslidecell 00 0.6
* Only a simple
* Test!
!eslidecell
And compile the code with a make.sh:
name=test
doconce format html $name
doconce format html $name --encoding=utf-8
doconce format html $name --encoding=utf-8 --html_style=bootstrap
doconce slides_html $name reveal --html_slide_theme=beige
And still returning an error at the output:
translating doconce text in test.do.txt to html
Traceback (most recent call last):
File "/usr/local/bin/doconce", line 1177, in <module>
main()
File "/usr/local/bin/doconce", line 1167, in main
eval(command + '()')
File "<string>", line 1, in <module>
File "/usr/local/bin/doconce", line 92, in format
doconce.doconce.format_driver()
File "/usr/local/lib/python2.7/dist-packages/doconce/doconce.py", line 4499, in format_driver
out_filename = file2file(filename_preprocessed, format, basename)
File "/usr/local/lib/python2.7/dist-packages/doconce/doconce.py", line 3478, in file2file
filestr = doconce2format(filestr, format)
File "/usr/local/lib/python2.7/dist-packages/doconce/doconce.py", line 3905, in doconce2format
filestr = INTRO[format] + filestr
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 306: ordinal not in range(128)
translating doconce text in test.do.txt to html
open file with encoding utf-8
output in test.html
translating doconce text in test.do.txt to html
open file with encoding utf-8
output in test.html
slides written to test.html
I'm using kubuntu 15.
from doconce.
When I remove the first line of make.sh, it compiles properly. In this case, the make.sh is:
name=test
doconce format html $name --encoding=utf-8
doconce format html $name --encoding=utf-8 --html_style=bootstrap
doconce slides_html $name reveal --html_slide_theme=beige
It is all good now. Thanks for the nice package and for the help!
from doconce.
If you update to the most recent doconce version, you will get a sensible error message about missing encoding in your test case, rather than the UnicodeDecodeError from Python.
from doconce.
Related Issues (20)
- Collapse solutions, answers, hints don't work on Chrome for iOS HOT 3
- Support re: Unknown escapes in repl consisting of '\' and an ASCII letter now are errors.
- http --> https for netdna.bootstrapcdn.com HOT 3
- PYPI package seems to have wrong preprocess.py dependency HOT 1
- BIBFILE and publish issues? HOT 2
- conda paver via doconce conflicts with tensorflow HOT 2
- Sphinx 1.8.4 - Build Process Error HOT 14
- How to insert labels and caption in Tables? HOT 1
- Pagebreak for PDF HOT 1
- New version of book built with doconce HOT 1
- error in windows 10 HOT 12
- Add answers_at_end option and review behavior for solutions_at_end HOT 1
- Error: test for illegal option: --solutions at end without underscores
- Syntax example on web page is broken. HOT 1
- Broken links to Mako in documentation HOT 1
- Mistake in quickref.html about formatting the exercise section HOT 1
- Add new commands to hide answers/solutions or move them to end of document
- Using sudo pip install is regarded as bad practice and fails on Python virtual environments HOT 1
- Placement of solution in running text HOT 2
- ispell isn't anymore in ubuntu/mint HOT 1
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 doconce.