OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Problem with a russian MS Word document

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> Setup and Troubleshooting
View previous topic :: View next topic  
Author Message
beaber
Newbie
Newbie


Joined: 03 Jan 2005
Posts: 1

PostPosted: Mon Jan 03, 2005 12:15 pm    Post subject: Problem with a russian MS Word document Reply with quote

Hi All!

I have a problem with a MS Word document, wich was written in russian - I can open the file, but instead russian letters I see some spesial characters. I tried to set up language in options and fonts settings, but it didn't help me. I use Windows 2000 and german version 1.1.4 of OO. Can anybody tel me what shoud I do to read my document?

Any help will be appresiated.
With best regards,
Andrej Litowka
Back to top
View user's profile Send private message
multi-lingual_ooo
OOo Advocate
OOo Advocate


Joined: 06 Nov 2004
Posts: 458

PostPosted: Fri Jan 07, 2005 6:20 pm    Post subject: Re: Problem with a russian MS Word document Reply with quote

Quote:
instead russian letters I see some special characters.


a) Have you installed Russian fonts?

b) Did you set OOo to a specific character set, or are you allowing it to select the appropriate character set?

My guess is that you set the default character set to something like Latin-1, which does not do Russian.

Quote:
I tried to set up language in options and fonts settings, but it didn't help me.


What exactly did you do/try?

xan

jonathon
_________________
One of the following might contain more details:

http://oooauthors.org/en/members/tutorials/multilingualooo/
http://esnips.com/web/OOoRelatedThings/
http://esnips.com/web/GraphologyTools
Back to top
View user's profile Send private message Send e-mail
esperantisto
Super User
Super User


Joined: 26 Dec 2003
Posts: 779
Location: Belarus

PostPosted: Sat Jan 08, 2005 3:05 am    Post subject: Reply with quote

Such a prblem is typical if you try to open a document in Russian (Belarusian, Bulgarian etc...) created by MS Word 6.0 or 95 because of incorrect langauge settings. I see basically two ways to solve the problem:
1) Ask the one, who created the document, to correctly set the language in Word and resend it to you.
2) Use a macro that can be found somewhere in http://ru.openoffice.org, http://www.ooextras.org or http://www.altlinux.ru (I can't remember the exact location - please, search those locations or try to search a file ooextras.rus.zip on ftp servers). There are two versions: for Word and for Excel files. Both do essentially the same: just replace Latin characters with Cyrillic. If you're good in programming, you can write such a macro on your own.

Some remarks for multilingual-ooo:
Quote:
a) Have you installed Russian fonts?


As Andrej has written, he uses Windows 2000. In that OS, there are no "Russian" fonts, as all basic fonts, such as Times New Roman, Arial, Courier New, Lucida etc, are Unicode-based OpenType fonts and contain Cyrillic letters along with others.

Quote:
b) Did you set OOo to a specific character set, or are you allowing it to select the appropriate character set?


OOo is Unicode-based and cannot be set to a "specific character set" (you can only define the default character set for HTML output, but that's a different story).
Back to top
View user's profile Send private message
esperantisto
Super User
Super User


Joined: 26 Dec 2003
Posts: 779
Location: Belarus

PostPosted: Sat Jan 08, 2005 3:18 am    Post subject: Reply with quote

've found the macro code in my archives. Unfortunately, this site is not friendly to Cyrillic, so, most probably, you'll see question marks instead of letter. Here is is:

Code:
REM  *****  Recode from cp1252 to cp1251 for Word files without language set. Author Dmitry G. Mastrukov, 2002  *****
REM  ***** GPL lisension


Dim mCP1252(123) As String
Dim mCP1251(123) As String

Sub Init
mCP1252() = Array("€","‚","ƒ","„","…","†","‡","ˆ","‰","Š","‹","Œ","Ž", _
                 "‘","’","“","”","•","–","—","™","š","›","œ","?","ž", _
                 "Ÿ","","","","","","","","","","","","", _
                 "","","","","","","","","","","","","", _
                 "","","","","","","","","","","","","", _
                 "","","","","","","","","","","","","", _
                 "","","","","","","","","","","","","", _
                 "","","","","","","","","","","","","", _
                 "","","","","","","","","","","","","", _
                 "","","","","","")

mCP1251() = Array("Ђ","‚","ѓ","„","…","†","‡","€","‰","Љ","‹","Њ","Ћ", _
                 "‘","’","“","”","•","–","—","™","љ","›","њ","ќ","ћ", _
                 "џ","","Ў","ў","Ј","","Ґ","","","Ё","","Є","", _
                 "","","","Ї","","","І","і","ґ","","","","ё", _
                 "№","є","","ј","Ѕ","ѕ","ї","А","Б","В","Г","Д","Е", _
                 "Ж","З","И","Й","К","Л","М","Н","О","П","Р","С","Т", _
                 "У","Ф","Х","Ц","Ч","Ш","Щ","Ъ","Ы","Ь","Э","Ю","Я", _
                 "а","б","в","г","д","е","ж","з","и","й","к","л","м", _
                 "н","о","п","р","с","т","у","ф","х","ц","ч","ш","щ", _
                 "ъ","ы","ь","э","ю","я")
End Sub

Sub RecodeAll
  Dim n As Long
  Dim oDocument As Object
  Dim oReplace As Object
  Init()   
  oDocument = ThisComponent
  oReplace = oDocument.createReplaceDescriptor
  For n = lbound(mCP1252()) To ubound(mCP1252())
    oReplace.SearchString = mCP1252(n)
    oReplace.ReplaceString = mCP1251(n)
    oReplace.SearchCaseSensitive = TRUE
    oDocument.replaceAll(oReplace)
   Next n
End Sub


Ugh, as the preview shows, the souce is really distorted. So, try to grasp the idea: the arrays mCP1252() and mCP1251() contain respectively letters of Windows CP1252 (Western European Latin) and Windows mCP1251 (Cyrillic) character sets, so that an element mCP1252(x) is a Latin letter with the same Windows code as mCP1251(x).

Good luck!
Back to top
View user's profile Send private message
multi-lingual_ooo
OOo Advocate
OOo Advocate


Joined: 06 Nov 2004
Posts: 458

PostPosted: Sat Jan 08, 2005 3:17 pm    Post subject: Reply with quote

Quote:
there are no "Russian" fonts, as all basic fonts ... contain Cyrillic letters along with others.


I didn't realize that the microsoft basic fonts contained Cyrillic letters.

Quote:
OOo is Unicode-based and cannot be set to a "specific character set" (you can only define the default character set for HTML output, but that's a different story).


I've come across a couple of macros for Writer that play tricks with the character setting. Specifically, they switch from UTF-8, to another character set.

xan

jonathon
_________________
One of the following might contain more details:

http://oooauthors.org/en/members/tutorials/multilingualooo/
http://esnips.com/web/OOoRelatedThings/
http://esnips.com/web/GraphologyTools
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> Setup and Troubleshooting All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group