Issue 9887 - Spell check in all languages doesn't work for non-Latin scripts
Summary: Spell check in all languages doesn't work for non-Latin scripts
Status: CLOSED FIXED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.0.1
Hardware: PC All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: khendricks
QA Contact: issues@sw
URL:
Keywords:
: 11351 (view as issue list)
Depends on:
Blocks:
 
Reported: 2002-12-05 23:25 UTC by akrioukov
Modified: 2007-01-16 20:33 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Sample document which contains some Russian and Greek words (5.74 KB, application/octet-stream)
2003-03-22 10:18 UTC, akrioukov
no flags Details
patch to handle unmappable chars when converting from UNicode to a specific text encoding (1.29 KB, patch)
2003-03-22 15:41 UTC, khendricks
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description akrioukov 2002-12-05 23:25:45 UTC
First, install more than one language packs for OOo. At least one of your 
languages should use a non-latin script (e. g. Cyrillic or Greek). I 
experimented both with Greek and Russian.
Enable the installed spelling tools for all your languages in Options--
>Language Settings-->Writting aids. Enable the "Auto SpellCheck" option for 
better visualisation. Mark a paragraph with your non-Latin language and type 
some correct and incorrect words to be sure that the spell check works OK.
Then go again to "Writing aids" and enable the option "Check in all languages". 
You will see that spell check works nicely for Western languages, but all your 
non-Latin words are just ignored.
Comment 1 h.ilter 2002-12-06 13:27:05 UTC
Reassigned to MRU
Comment 2 akrioukov 2003-03-22 10:18:56 UTC
Created attachment 5205 [details]
Sample document which contains some Russian and Greek words
Comment 3 akrioukov 2003-03-22 15:29:33 UTC
Hi!

The problem looks now as follows:

*Each* spell checker handles corectly only those words, which contain
only Unicode characters present in the corresponding codepage (latin1
for English, iso8859-7 for Greek, koi8-r for Russian). All words
consisting of other Unicode characters are skipped, i.e. considered
correct.

Reproduceable: always.

Desired behavior: all unknown words should be marked as incorrect, no
matter, which letters they include.

I've reassigned this issue to khendricks@openoffice.org . I've also
changed the "subcomponent" to "code".

I also think that #11351 should be marked as duplicate of this issue.
Comment 4 khendricks 2003-03-22 15:39:31 UTC
Hi, 
 
Here is a patch that should apply to lingucomponent in OOo1.0.2 and 
OOo 1.1Beta (see attached cnvt_fix.patch) or the inline version below. 
 
It should fix the problem you reported. 
 
You should be able to build this using the "solver" for that release and  
a fresh cvs checkout of lingucomponent plus this patch (since we are  
changing a header file please do a clean rebuild in lingucomponent). 
 
Perhaps someone there or another kind soul on discuss, can create  
"fixed" versions of libspell* for x86 Linux and WIN for both OOo 1.0.2 
and OOo 1.1 Beta 
 
Please let me know if this patch fixes the problem for you and if you see  
any strange or unwanted side-effects. 
 
Assuming you have the solver for OOo 1.1Beta you should be able to do  
the following under Linux 
 
export CVSROOT=:pserver:anoncvs@anoncvs@openoffice.org:/cvs 
cvs login (use anoncvs as password) 
 
# Then choose only 1 of the following cvs co commands that matches your solver 
 
#for OOo 1.1Beta do the following 
cvs co -r cws_srx644_ooo11beta lingucomponent 
 
#or for OOo 1.0.2 do the following 
cvs co -r OOO_STABLE_1 lingucomponent 
 
cd lingucomponent 
patch -p1 < cnvt_fix.patch 
tcsh 
../source Linux*Env.Set 
build 
cd unxln*.pro/lib 
cp libspell*.so INTO_PROGRAM_DIRECTORY_FOR_OOO/ 
 
Thanks, 
 
Kevin 
 
 
--- lingucomponent/source/spellcheck/myspell/myspell.cxx.prev   Thu Oct 31 11:04:50 
2002 
+++ lingucomponent/source/spellcheck/myspell/myspell.cxx        Sat Mar 22 09:59:03 
2003 
@@ -60,7 +60,8 @@ 
 #if 0 
    const char * special_chars = ".!_#$%&()* +,-/:;<=>?[]\\^`{|}~\t 
\x0a\x0d\x0ab\x0bb\x01\x0a1\'\""; 
 #else 
-   const char * special_chars = ".!_#$%&()* +,-/:;<=>?[]\\^`{|}~\t \x0a\x0d\x01\'\""; 
+   //   const char * special_chars = ".!_#$%&()* +,-/:;<=>?[]\\^`{|}~\t \x0a\x0d\x01\'\""; 
+   const char * special_chars = ".()[]<=>\^{|}~_"; 
 #endif 
 
    unsigned char * p = (unsigned char *) dest; 
--- lingucomponent/source/spellcheck/spell/sspellimp.hxx.prev   Sat Mar 22 09:41:50 
2003 
+++ lingucomponent/source/spellcheck/spell/sspellimp.hxx        Sat Mar 22 09:42:57 
2003 
@@ -104,7 +104,7 @@ 
 
 #define OU2ISO_1(rtlOUString)     ::rtl::OString((rtlOUString).getStr(), 
(rtlOUString).getLength(), RTL_TEXTENCODING_ISO_8859_1).getStr() 
 
-#define OU2ENC(rtlOUString, rtlEncoding)     ::rtl::OString((rtlOUString).getStr(), 
(rtlOUString).getLength(), rtlEncoding).getStr() 
+#define OU2ENC(rtlOUString, rtlEncoding)     ::rtl::OString((rtlOUString).getStr(), 
(rtlOUString).getLength(), rtlEncoding, 
RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK).getStr() 
 
 
 /////////////////////////////////////////////////////////////////////////// 
 
Comment 5 khendricks 2003-03-22 15:41:31 UTC
Created attachment 5206 [details]
patch to handle unmappable chars when converting from UNicode to a specific text encoding
Comment 6 khendricks 2003-03-22 15:43:40 UTC
Hi, 
 
Confirming issue and changing status to started (and then hopefully fixed for OOo 1.1 
final and OOo 1.0.3). 
 
Thanks for your bug report. 
 
Kevin 
 
 
 
Comment 7 khendricks 2003-03-24 18:57:55 UTC
Hi, 
 
I just changed things and ran tests on OOO_STABLE_1 and they seem to be fine. 
 
So this should be fixed in the upcoming OOo 1.0.3. 
 
I will leave the issue open to remind me to get these changes into OOo 1.1 as well. 
 
Thanks, 
 
Kevin 
 
Comment 8 akrioukov 2003-04-12 08:22:23 UTC
Kevin, I've downloaded 1.0.3 and everything seems to work as desired.
I hope your patch will be included to the upcoming 1.1 beta 2.

Thanks a lot,

Alexej
Comment 9 michael.ruess 2003-04-16 14:06:54 UTC
*** Issue 11351 has been marked as a duplicate of this issue. ***
Comment 10 khendricks 2003-05-28 16:13:40 UTC
Hi,

Resolving this as fixed since it was verified in OOo 1.0.3 and 
fixed in OOo 1.1 Beta2 as well.

Thanks,

Kevin
Comment 11 akrioukov 2003-05-28 19:35:25 UTC
Yes, I can verify this in 1.1Beta2. Thanks again, 
 
Alexej 
Comment 12 Mathias_Bauer 2007-01-16 20:33:58 UTC
time for closing