On Tuesday 19 April 2005 20:19, Eike Rathke wrote:
> Hi Hristo,
>
> On Tue, Apr 19, 2005 at 10:28:52 +0300, Hristo Simenov Hristov wrote:
> > I think that when I choose my encoding in the dialog, it does not
> > call the method for converting my encoding but calls some default method.
>
> Where (in which module, which dialog) did you try it?
In Writer I'm opening Text encoded file.
I tried with replacing of aImplIBM866ToUniTab with values of aImplMIKToUniTab
And when I opened TE file it appears correctly, so this array is correct. The 
problem is how to figure it out which aImplXXXXToUniTab using when I open 
such file with selected MIK encoding (I added in the combobox needed string 
to be chosen this MIK encoding)

> > The encoding which I want to add is not official one but it is used
> > here in Bulgaria for plain text files. A lot of people have files left
> > from old DOS days.
>
> You should refrain from setting the RTL_TEXTENCODING_INFO_MIME bit in
> aImplMIKTextEncodingData, as this would offer the encoding for saving
> HTML files and such. The encoding isn't a MIME encoding, and other
> applications wouldn't recognize it. There's also no use for setting the
> mpBestMimeCharset to "MIK". If mpBestUnixCharset is "iso8859-5" it
> should probably be "iso-8859-5" instead.
I will try with this changed code:
static ImplTextEncodingData const aImplMIKTextEncodingData
    = { { &aImplMIKByteCvtData,
          ImplCharToUnicode,
          ImplUnicodeToChar,
          NULL,
          NULL,
          NULL,
          NULL,
          NULL,
          NULL },
        1,
        1,
        1,
        0, <- instead of 238
        "iso-8859-5", <- instead of iso8859-5
        "iso-8859-5", <- instead of MIK
        RTL_TEXTENCODING_INFO_ASCII }; <- I removed RTL_TEXTENCODING_INFO_MIME
    /* SCRIPT_CYRILLIC Bulgarian MIK encoding*/

-- 
Hristo Simeonov Hristov
Leader of OpenOffice.org - Bulgaria

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to