![]() ![]() It could be done in perhaps 30 lines of Python code, or twice that much Java code. If you have some time, the best solution may be to create a Python or Java macro to read the Writer document and write to a file without the BOM. Instead, there are various command line tools such as iconv that can remove the BOM. I do not see any filter options that can save without a BOM from LibreOffice. No, this produces ASCII-encoded text, which will destroy most Unicode characters. UTF-8 WITHOUT the BOM, which I believe is called ASCII/US ![]() It could be modified to use a global variable and save to the previously used location. Set it to a hotkey or toolbar button by going to Tools -> Customize. ThisComponent.storeAsURL(aURL(0), fileProps()) ODlg = createUnoService(".dialogs.FilePicker") In order to avoid the slowness of Save As., you could use a macro like this: Sub SaveAsUtf8ĭim fileProps(1) as new .PropertyValueįileProps(1).Value ="UTF8,CRLF,Liberation Mono,en-US," To show the encoding options dialog, go to Save As. Having to use Save As every single time is a real waste of time. LibreOffice should preserve the encoding of the file and save the file as UTF-8 without the BOM. If I have a file correctly encoded in UTF-8 without the BOM, and I then try to save it using, for example, Ctrl+ S then the file will be automatically saved using the Text default encoding which saves the file as UTF-8 with BOM which breaks the file. ![]() All the files I will ever want to write should be UTF-8 encoded without the BOM, so I'd like to avoid wasting time everytime by manually selecting this option. I only edit plain text files and I use LibreOffice only for spellchecking (and counting words).Maybe once in ten trials it shows the popup. most of the time it doesn't show any popup where you can choose the encoding and just saves as if you chose the Text option. I do know that there is a Text encoded option where you can (in theory, if it actually worked) choose the encoding of each plain file. I want it to be UTF-8 WITHOUT the BOM, which I believe is called ASCII/US in LibreOffice. I want to change the default text encoding used by LibreOffice when saving a document as a Text document. ![]()
0 Comments
Leave a Reply. |