To show the encoding options dialog, go to Save As... and check Edit filter settings
.
In order to avoid the slowness of Save As..., you could use a macro like this:
Sub SaveAsUtf8
dim aUrl()
dim fileProps(1) as new com.sun.star.beans.PropertyValue
fileProps(0).Name = "FilterName"
fileProps(0).Name = "Text (encoded)"
fileProps(1).Name = "FilterOptions"
fileProps(1).Value ="UTF8,CRLF,Liberation Mono,en-US,"
oDlg = createUnoService("com.sun.star.ui.dialogs.FilePicker")
oDlg.setMultiSelectionMode(false)
oDlg.initialize(array(1))
oDlg.execute
aUrl = oDlg.getFiles()
If UBound(aUrl) > -1 Then
thisComponent.storeAsURL(aURL(0), fileProps())
End If
End Sub
Set it to a hotkey or toolbar button by going to Tools -> Customize
.
It could be modified to use a global variable and save to the previously used location.
UTF-8 WITHOUT the BOM, which I believe is called ASCII/US
No, this produces ASCII-encoded text, which will destroy most Unicode characters.
I do not see any filter options that can save without a BOM from LibreOffice. Instead, there are various command line tools such as iconv that can remove the BOM.
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. It could be done in perhaps 30 lines of Python code, or twice that much Java code. Note: I would not recommend doing this in Basic because of its poor file handling functions.
Best Answer
Yes! There is a utility called
qrencode
that can render these for you.The only really important factor for a QR code is that the 2D array has "darker" and "ligher" pixels / segments. It can be colored too, though contrast can start to be an issue.
ASCII
Your ability to read this QR code will likely depend on the camera's resolution, distance, and the software you're using.
Note: I used
-t ASCIIi
(Inverted ASCII) because my terminal is White-on-Black.ANSI
This mode works by setting the background color to black or white, and printing a number of space characters.
Some of the raw characters written to the terminal are shown below, these are ANSI escape codes. An "escape" character has a value of
0x1b
and can often be written as\e
.\e[40m
sets the background color to black\e[47m
sets the background color to white0x20
is an ASCII spaceUTF-8
There is also a UTF-8 mode (
-t UTF8
). This mode uses the "half block" characters to increase the density, and cut the line count by half.Screenshot from @grawity (thanks)