[arch-general] Opening a document with unicode in path
chrisjbillington at gmail.com
Fri Aug 2 17:48:55 UTC 2019
> However, you might be onto something here because, interestingly enough:
> while BASH prompt and autocompletition feature both decode the character
> correctly, `ls` does not and outputs a sequence of escape codes:
That's interesting. If I run:
and then ls, I get it printing correctly with the accented character. Then
if I do an os.listdir(b'.') in Python and look at its raw bytes, they are
the same as if I type the character on my keyboard (US keyboard but with a
compose key) and encode UTF8. So it looks to me to be UTF8 encoded (I do
not understand the escape sequences \303\251 - once in Python I see the two
bytes \xc3\xa9 for the character, which is the correct UTF8 encoding but do
not map to the numbers in the bash escape sequences).
What happens if you run the following?
$ echo $'\303\251'
I get the character printing correctly. This could be terminal-dependent
behaviour, it works for me in xterm, tilix, alacritty and gnome-terminal.
Perhaps if it doesn't work for you in one of these terminals it indicates
there is a locale issue deeper than the check you already did to ensure the
locale was set correctly.
On Fri, Aug 2, 2019 at 1:36 PM John Z. <johnz at pleasantnightmare.com> wrote:
> > Can you determine some steps that exactly reproduce the problem?
> > Assuming that the problem should manifest when opening the file using
> > /usr/bin/loffice /path/to/file, I tried creating a test file and opening
> > it, and it worked:
> Hi Eli,
> good idea, I tried following your sequence as well.
> I created a directory using `mkdir`, then launched libre office and
> tried to save a file in it. Interesting thing happens:, it actually
> creates a directory named 'Proc?dures' instead of the original
> 'Procédures' directory, and saves it in there. I repeated the test
> twice, because the first time around, I was puzzled enough that I
> wasn't sure I actually saved the file.
> Furthermore, I copied the file using console into the 'Procédures',
> then opened it using libreoffice, and it opened the one in
> 'Proc?dures' - I know because I updated the file and saved it, and
> the latter one was updated.
> The only difference between us is that I'm using `libreoffice`
> launcher command, and you seem to have `loffice`? The package is
> also libreoffice-fresh, package version 6.2.5-1, and `libreoffice
> --version` 126.96.36.199 2@(build: 2)
> The --version in ubuntu, that works, is 188.8.131.52
> P.S. I am unsure how well Unicode fares in mailing lists, so I
> apologize if there are weird escape sequences in there. I just
> composed it with vim.
> "That gum you like is going to come back in style."
More information about the arch-general