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

uRf-8!? #70

Closed
GoogleCodeExporter opened this Issue Apr 18, 2015 · 3 comments

Comments

Projects
None yet
1 participant
@GoogleCodeExporter
Copy link

GoogleCodeExporter commented Apr 18, 2015

What steps will reproduce the problem?
1.txt2tags --target=xhtml --encoding=urf-8 --toc --verbose FILE &
2.
3.

What is the expected output? What do you see instead?
A well-formed XHTML file. An almost well-formed XHTML file with the code 
"encoding=urf-8" at the second line, inside XML declaration.

What version of the product are you using? On what operating system?
txt2tags version 2.5 <http://txt2tags.sf.net>. Xubuntu.

Please provide any additional information below.
The thing is that the command line interface accepted "ufr-8" for the enconding 
parameter (excuse my English, please)

Original issue reported on code.google.com by jesuscan...@gmail.com on 16 Nov 2010 at 12:25

@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 18, 2015

Txt2tags makes no validation in the user informed encoding, because you're free 
to write whatever you want in there. Each target may use a different format or 
code for encoding, that's why it's a free form field.

Original comment by aureliojargas@gmail.com on 17 Nov 2010 at 5:33

@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 18, 2015

Thank you a lot for your attention and answer.

So, what is the resulting character encoding of the output? Txt2tags 
documentation says "−−encoding set target file encoding (utf−8, 
iso−8859−1, etc)"... This description made me thought that I could change 
the character enconding of the output file.

Bye the way, would it be possible to use the txt2tags web interface with 
non-ASCII characters text? File upload?

Thank you very much. I really think you are all doing a great tool. I moved to 
txt2tags from ReStructured Text and I do not repent. Keep working!

Original comment by jesuscan...@gmail.com on 18 Nov 2010 at 11:30

@GoogleCodeExporter

This comment has been minimized.

Copy link

GoogleCodeExporter commented Apr 18, 2015

Currently, txt2tags does not change the encoding of the original file. With 
--encoding you just inform it which encoding you used in the source file. In 
the future txt2tags v3, when we'll switch to Python 3, file encoding will be 
easier to handle and we can do the encoding conversion internally. I've opened 
issue 80 for that.

But you're absolutely right, the --help description is wrong. I just fixed that 
in r496, thanks!

The encoding in the Web interface was not defined by default, so you could you 
any encoding. But the output headers were not set to a specific encoding. Now 
(in r497) I've fixed the web interface to always use UTF-8 as the input text, 
now the headers (for example, in HTML) are set correctly. I've also already 
updated the web interface in the txt2tags website. Thanks again!

File upload is not supported yet, but this can be a great feature. I've opened 
issue 79 for that.

You'll be credited in the changelog file. I'm using jesuscanonavarro, but you 
can give me your full name instead.

I'm glad you're happy with txt2tags. Maybe you could leave a comment about your 
transition from reST in http://txt2tags.wordpress.com/user-comments/ ?

Thanks!

Original comment by aureliojargas@gmail.com on 18 Nov 2010 at 1:52

  • Changed state: Fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment