Bug 80363 - VIEWING EDITING: spellchecker works wrong if there are Cyrillic symbols in the path to Libre folder
Summary: VIEWING EDITING: spellchecker works wrong if there are Cyrillic symbols in th...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Linguistic (show other bugs)
Version:
(earliest affected)
4.2.5.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: László Németh
QA Contact:
URL:
Whiteboard: target:4.4.0 target:4.3.0 target:4.2.6
Keywords: regression
: 81616 81619 (view as bug list)
Depends on:
Blocks: mab4.2
  Show dependency treegraph
 
Reported: 2014-06-22 19:58 UTC by Alex
Modified: 2014-09-05 04:05 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of comparing two situations (612.67 KB, image/png)
2014-06-22 19:58 UTC, Alex
Details
4.3.1 Daily from 19.07.2014 - seems to be fixed (61.28 KB, image/png)
2014-07-19 20:52 UTC, Alex
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex 2014-06-22 19:58:25 UTC
Created attachment 101535 [details]
Screenshot of comparing two situations

Windows 7 x64

If path to LibreOffice has no Cyrillic symbols (c:\program files (x86)\LibreOffice4) and words all documents are opened just like needed.

If path does contain Cyrillic symbols (c:\программы\LibreOffice 4), then LibreOffice marks the whole text as misspelled. Changing document\paragrapgh\word language changes nothing, the real language of the text also changes nothing.
Screenshot of comparing is added as an attachment.

The problem is connected to the file spelllo.dll in ..\program\..
If replace it with the file spelllo.dll from LibreOffice 4.2.4.2 then bug "disappears" and everything works fine.
Comment 1 Alex 2014-07-03 17:11:59 UTC
Bug seems to be fixed in LibreOffice 4.3.0.2 (RC2)
Comment 2 Alex 2014-07-03 17:22:52 UTC
Pardon me - I launched wrong version. It is not fixed
Comment 3 Urmas 2014-07-05 01:44:25 UTC
The path to the dictionary files is misencoded, it's UTF-8 in local codepage represented as UTF-16.
Comment 4 Michael Stahl 2014-07-07 09:55:07 UTC
that's a very good bug report... the only commit that could
have caused this regression is:

commit 59906c3d54e6541185f4bf85b1d1c70530198059                                 Author:     László Németh <nemeth@numbertext.org>                               AuthorDate: Fri Apr 25 12:09:52 2014 +0200

    fdo#48017 fix WIN32 long path name support of spelling dictionaries
Comment 5 Michael Stahl 2014-07-07 10:31:03 UTC
oops, forgot to CC: the author
Comment 6 László Németh 2014-07-14 11:09:14 UTC
Perhaps the osl::FileBase::getSystemPathFromFileURL() doesn't add the WIN32 long path prefix "\\?\" to the path (see in _osl_getSystemPathFromFileURL in http://opengrok.libreoffice.org/xref/core/sal/osl/w32/file_url.cxx). This prefix is mandatory for Hunspell in WIN32 environment to convert the UTF8 encoded path and use it with _wfopen(). In this case the preferred solution is to check the path before calling Hunspell (MyThes/Hyphen) and add the missing long path prefix.
Comment 7 László Németh 2014-07-14 11:10:36 UTC
(Assigned to me.)
Comment 8 Commit Notification 2014-07-15 12:27:31 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ea9331fd4955fe6fad0957ee6240275148353e32

fdo#80363 always use WIN32 long path prefix with Hunspell, MyThes, Hyphen



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2014-07-15 23:02:34 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "libreoffice-4-3-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=012bdc381f1ee36a1ee1157c1821fdeb49066078&h=libreoffice-4-3-0

fdo#80363 always use WIN32 long path prefix with Hunspell, MyThes, Hyphen


It will be available already in LibreOffice 4.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2014-07-16 10:07:46 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5536b127a105123de6f64dcf8f53dfa277faef3c&h=libreoffice-4-3

fdo#80363 always use WIN32 long path prefix with Hunspell, MyThes, Hyphen


It will be available in LibreOffice 4.3.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 11 László Németh 2014-07-17 07:49:06 UTC
Alex, could you check the proposed solution with the daily build of the master or libreoffice-4-3? If yes, thanks in advance!
Comment 12 Alex 2014-07-17 19:57:48 UTC
(In reply to comment #11)
> Alex, could you check the proposed solution with the daily build of the
> master or libreoffice-4-3? If yes, thanks in advance!

No problem. I've just been waiting some time to be sure the patch will be included in daily builds.

I tested this all latest 16-17 July dev builds - 4.2.7 (just to be sure) , 4.3, 4.4

For 4.3, 4.4 now it seems to be even worse. Now LibreOffice marks the whole text as misspelled all the time - Cyrillic symbols in the path doesn't change anything. 
So it works wrong all the time.

4.2.7 crashes at all if I install any dictionaries in it.
Comment 13 László Németh 2014-07-18 09:22:13 UTC
Alex, many thanks for the tests! Could you check them with a fresh user profile (https://wiki.documentfoundation.org/UserProfile), too? Version 4.2.7 hasn't modified yet.
Comment 14 Alex 2014-07-18 11:49:07 UTC
(In reply to comment #13)
> Alex, many thanks for the tests! Could you check them with a fresh user
> profile (https://wiki.documentfoundation.org/UserProfile), too? Version
> 4.2.7 hasn't modified yet.

I always test with fresh profile and delete all Libre folders, including the ones in c:\users\user\Roaming\.. . Moreover, dev builds use another folder in Roaming folder (LibreOfficeDev instead of LibreOffice).

Anyway, tried daily 4.3.1 and 4.4 on another system with a completely new user and no previous Libre install at all. Behaviour is still the same - the whole document is underlined red and it doesn't depend on the path of Libre install.
Comment 15 László Németh 2014-07-19 02:19:50 UTC
Alex, many thanks for your feedback! Using the procmon tool, András Tímár has confirmed the suspicion, that "\\?\"+_wfopen() combination doesn't expand the relative paths, in fact, also absolute paths with relative subparts (eg. "\\?\C:\something\..\ru.aff") . So I hope, this bug will be fixed soon.
Comment 16 Alex 2014-07-19 03:02:52 UTC
(In reply to comment #15)
> Alex, many thanks for your feedback! Using the procmon tool, András Tímár
> has confirmed the suspicion, that "\\?\"+_wfopen() combination doesn't
> expand the relative paths, in fact, also absolute paths with relative
> subparts (eg. "\\?\C:\something\..\ru.aff") . So I hope, this bug will be
> fixed soon.

No problem)
Comment 17 Commit Notification 2014-07-19 08:33:48 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7efd83bb29ef8be8c78c4da5452fe3293ed15ea4

fdo#80363 add _wfullpath to expand ".." in dictionary paths



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2014-07-19 08:35:36 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=24e9950f68ca57c454dbb35cf8562d82e76a42e7&h=libreoffice-4-3

fdo#80363 add _wfullpath to expand ".." in dictionary paths


It will be available in LibreOffice 4.3.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 19 Alex 2014-07-19 20:52:25 UTC
Created attachment 103125 [details]
4.3.1 Daily from 19.07.2014 - seems to be fixed

(In reply to comment #18)
> Laszlo Nemeth committed a patch related to this issue.
> It has been pushed to "libreoffice-4-3":
> 
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=24e9950f68ca57c454dbb35cf8562d82e76a42e7&h=libreoffice-4-3
> 
> fdo#80363 add _wfullpath to expand ".." in dictionary paths
> 
> 
> It will be available in LibreOffice 4.3.1.
> 
> The patch should be included in the daily builds available at
> http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
> information about daily builds can be found at:
> http://wiki.documentfoundation.org/Testing_Daily_Builds
> Affected users are encouraged to test the fix and report feedback.

Latest daily build of 4.3.1 seems to have this bug fixed (I installed dictionaries). It works as needed - underlines misspelled words and doesn't underline the right ones. Cyrillic letter or symbols in the install path do not reproduce the bug anymore.

So, thanks =)
Comment 20 László Németh 2014-07-20 10:14:17 UTC
Alex, many thanks for your great feedback! The target of the long path support was to fix an annoying roaming profile problem (disappearing dictionaries), so LibreOffice has got better Windows support now. I will add these patches to the branch 4.2, too.
Comment 21 Commit Notification 2014-07-20 11:48:34 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d7374d4812316a79916956f03c8bd4a281fdbdec

fdo#80363 _wfullpath in MyThes and Hyphen



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 22 Alex 2014-07-20 14:31:24 UTC
(In reply to comment #20)
> Alex, many thanks for your great feedback! The target of the long path
> support was to fix an annoying roaming profile problem (disappearing
> dictionaries), so LibreOffice has got better Windows support now. I will add
> these patches to the branch 4.2, too.

No problem)
Comment 23 Commit Notification 2014-07-21 06:49:52 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0ad283adb51b3a1bb777e6341e61541d4bffaa44&h=libreoffice-4-3

fdo#80363 _wfullpath in MyThes and Hyphen


It will be available in LibreOffice 4.3.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 24 manj_k 2014-07-21 18:59:25 UTC
*** Bug 81616 has been marked as a duplicate of this bug. ***
Comment 25 OfficeUser 2014-07-21 19:56:43 UTC
LO 4.3.0.3 rc should never be released with this bug. Is there a 4.3.0.4 rc planed?
Comment 26 Alex 2014-07-21 22:16:40 UTC
(In reply to comment #25)
> LO 4.3.0.3 rc should never be released with this bug. Is there a 4.3.0.4 rc
> planed?

I guess so but don't know exactly. Patches seem to be pushed into every branch of daily builds though. 4.2.7, 4.3.1 & 4.4.0 already have this bug fixed because of that. So, maybe, they'll go into RCs as well.
Comment 27 manj_k 2014-07-22 06:36:44 UTC
*** Bug 81619 has been marked as a duplicate of this bug. ***
Comment 28 Commit Notification 2014-07-22 18:35:07 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=723198a9f7b7483c9366b06cedc8cfa6079efe25&h=libreoffice-4-2

fdo#80363 backport of the fix for Cyrillic spell. dictionary path


It will be available in LibreOffice 4.2.7.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 29 James Buton 2014-07-22 20:31:27 UTC
Hi there, This is great news. However, this bug still affects documents WITHOUT Cyrillic symbols. 

Merely opening a pre-existing document in .doc format with English only on the document causes all the words to bee 'seen' as misspelt.
Comment 30 Alex 2014-07-22 22:13:24 UTC
(In reply to comment #29)
> Hi there, This is great news. However, this bug still affects documents
> WITHOUT Cyrillic symbols. 
> 
> Merely opening a pre-existing document in .doc format with English only on
> the document causes all the words to bee 'seen' as misspelt.

The problem was not in Cyrillic symbols in document but in the path to Libre folder e.g. c:\Программы\LibreOffice. Language of the document doesn't matter.

What version are you using to reproduce the bug?
Right now versions 4.2.7 and 4.3.1 and 4.4.0 don't have this bug at all - I tested them right now to check your information.
Versions 4.5.2, RC of 4.2.6 and 4.3.0 RC3 - can still have it. I don't know if the patch will be included in current RCs. If it won't - we'll have to either stick to 4.2.4 for now or use a workaround:
For 4.2.5: 
- replace "spello.dll" in the folder "..\Libre_Installation_Folder\program\" with the one from 4.2.4
For 4.2.6:
- replace "spello.dll" with the one from 4.2.4 and check if spellckecher works and checks misspelled words; if it doesn't then try to replace "spello.dll" with the one from 4.2.7 (daily builds) and check again
For 4.3.0
- replace "spello.dll" with the one from 4.3.0 RC2 (works for sure) or 4.3.1 (daily builds - needs checking)
Comment 31 Commit Notification 2014-07-23 15:40:52 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "libreoffice-4-2-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=93350f3d968e01057cf0075582edbfa9a847ed1d&h=libreoffice-4-2-6

fdo#80363 backport of the fix for Cyrillic spell. dictionary path


It will be available already in LibreOffice 4.2.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 32 Urmas 2014-07-24 20:32:39 UTC
Fixed in master build.
Comment 33 Commit Notification 2014-08-04 11:39:59 UTC
Laszlo Nemeth committed a patch related to this issue.
It has been pushed to "libreoffice-4-3-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9548c4ab5db6889ee91f01a8207bf4009d623f9f&h=libreoffice-4-3-0

fdo#80363 add _wfullpath to expand ".." in dictionary paths


It will be available already in LibreOffice 4.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 34 Adolfo Jayme 2014-09-05 04:05:44 UTC
*** Bug 83513 has been marked as a duplicate of this bug. ***