Plain Text Export Error Introduced In 0.2.0 [prob. fixed]

Dear Scrivener Team,

after a long time I tested the plain text export (compile) together with MMD the way described herehttp://www.literatureandlatte.com/forum/viewtopic.php?f=30&t=9499&start=0&view=viewpoll. At least in the versions until 1.6 it worked fine. Using 0.2.0 the exported .txt seams to have errors or a wrong encoding “header”.

If I open the .txt in jedit with automatic encoding detection I get the following error:

D:\grebenst\My_Info_Local\Daten\Diss\svn_update\trunk\DISS\Scrivener\Diss.txt: The file could not be loaded correctly (some data might be lost) with the encoding "Cp1252". (java.nio.charset.UnmappableCharacterException: Input length = 1) Try selecting a different encoding. It can be selected with the menu File->Reload with Encoding. If you want it to be done automatically, add the candidates into "List of fallback encodings" in Encodings pane of Global Options.

My python script complains about “mapping to undefined”.

txt_error.png

To me this is a crucial functionality since I have to write my PHD- thesis in Latex and MMD/ Latex Export will not be available in Version 1.0 :cry: Please fix or use the “old export”.

I will do some further debugging this night since I suspect the fixed ligatures bug to cause these problems.

Best Regards,

Markus
P.S.: Python Script to change encoding:

[code]# python
path=‘Diss.txt’ #input file name
path2=‘Diss_utf8.txt’ #output file name

f= open(path, ‘rb’)
content= unicode(f.read(), ‘cp1252’)
f.close()
f= open(path2, ‘wb’)
f.write(content.encode(‘utf-8’))
f.close()
[/code]

It’s the ligatures. fi and fl ligatures during export produce characters that are not available in cp1552 encoding. I reduced a test project to just to words containing the latter. Ligatures worked in previous versions but produced scrambled output.

Best Regards,

Markus

P.S: Ligatures within finger and flexing after export: �nger. flexing.

I tested the file which produced the undefined characters using 0.2.1 and the problem still exists.

Just a guess: Do you really export cp1252 character encoding? Perhaps it is UTF8 and the header of the .txt file is wrong?

Here’s the Project- Backup as a zip file for debugging purpose.

Best Regards,

Markus
textexporttest 29_3_11_12_15_PM.zip|attachment (8.42 KB)