Apache OpenOffice (AOO) Bugzilla – Issue 110222
Problem opening files in already running instance if filename contains non-ASCII symbols (8-bit locales)
Last modified: 2014-01-29 13:23:36 UTC
When OpenOffice is already running, some files can only be opened via 'Open File' dialog and not via command line. This happens with 8-bit encodings of filesystem. To reproduce: (assuming <ascii>.doc has only ascii symbols in name, <russian>.doc has some cyrillic symbols) 1. First instance: ooffice 2. ooffice <ascii>.doc - ok, file opens in new window 3. ooffice /home/user/<ascii>.doc - ok, file opens in new window 4. ooffice <russian>.doc - error: file <garbage> not found 5. ooffice /home/user/<russian>.doc - nothing happens at all The problem is caused by command line args encoding when sending command line to pipe in /tmp. There are two problems. First, if path is absolute, file name is not converted to "file://" URL (sal/osl/unx/file_uri.cxx:488 - just returns on error). Running process then just ignores it. Second - file name is converted into UTF8 before sending. Running process then just decodes file name from URL encoding and tries to open it. This is ok, if filesystem is in UTF8 encoding, but for 8-bit locales UTF8 file name could not be opened. I'm attaching patch, which solves those problems. It should work on both UTF8 locales and 8-bit locales. Additional information: OS: Gentoo Linux Arch: x86_64 Kernel: 2.6.32 Locale: ru_RU.KOI8-R, filesystem encoding is also KOI8-R, Glib vars set: G_BROKEN_FILENAMES=1, G_FILENAME_ENCODING=@locale
Created attachment 68414 [details] correction