Hi,
I've created a text file, renamed the extension to odt and tried using filteroptions. It is unable to open the file. However, if i select this option via the text encoding dialog UI, it is able to display the text. > > Prop.Name = "FilterOptions" > > Prop.Value <<= "UTF8" I've yet to try the type detection, will further update after i figure it out. Thanks. Cheers, Wei Min > Date: Mon, 9 Nov 2009 10:14:56 +0100 > From: [email protected] > To: [email protected] > Subject: Re: [api-dev] loadcomponentfromurl > > Mikhail is right, an important piece of documentation is missing here > and i renew my request that we document filter specific settings > somewhere. A wiki page showing the names that have to be used via API > and all filter specific settings. These settings depends on the filter > implementation and should be documented for each filter. > > Today we have only a list of filter names somewhere in the framework > wiki section. > > Juergen > > Mikhail Voytenko wrote: > > Hi Wei Min, > > > > As I have written in one of the previous emails, I would suggest to make > > the type detection explicitly to get the required filter name. And in > > case you get "Text (encoded)" filter, please add the filter options > > containing the encoding. > > > > The problem with filter options is that there seems to be no > > documentation regarding them. According to source-code the following > > property in the MediaDescriptor might work in case of "Text (encoded)" > > filter. > > Prop.Name = "FilterOptions" > > Prop.Value <<= "UTF8" > > > > Before you start with the TypeDetection usage, please try just to add > > the filter options property in MediaDescriptor and try it with the > > problematic documents. Just to be sure that the options are accepted in > > this format. > > > > Best regards, > > Mikhail. > > > > On 11/09/09 03:09, Wei Min Teo wrote: > >> Hi all, > >> > >> > >> > >> Thanks for your responses. > >> > >> > >> > >> Let's assume that indeed those files are not "legitimate" .doc files. If > >> someone creates a text file and renames it as .doc, the Writer encoding > >> text dialog will pop out a UI. If I do choose a encoding such as UTF-8, it > >> will be able to open the text file with no problems and the text will be > >> readable. This is what i want to do programatically, to open with a > >> specified encoding without using the pop-out UI. > >> > >> > >> > >> Is it possible to do this? > >> > >> > >> > >> > >> > >> > >> > >> Cheers, > >> > >> > >> > >> Wei Min > >> > >>> Date: Fri, 6 Nov 2009 12:10:58 +0100 > >>> From: [email protected] > >>> To: [email protected] > >>> Subject: Re: [api-dev] loadcomponentfromurl > >>> > >>> Hi, > >>> > >>> On 11/06/09 10:26, Juergen Schmidt wrote: > >>>> Mikhail Voytenko wrote: > >>>>> Hi, > >>>>> > >>>>> On 11/06/09 08:50, Juergen Schmidt wrote: > >>>>>> Ariel Constenla-Haile wrote: > >>>>>>> Hello Wei, > >>>>>>> > >>>>>>> On Thursday 05 November 2009, 22:51, Wei Min Teo wrote: > >>>>>>>> I'm not going to use any filters or perhaps it automatically uses a > >>>>>>>> default > >>>>>>>> filter. Anyway, to clarify, I think my problem occurs with opening > >>>>>>>> *.doc > >>>>>>>> or *.ppt files. When I open it prompts me on which character > >>>>>>>> encoding i > >>>>>>>> want to use. This would "hang" an automation program. > >>>>>>> this sounds like the Writer encoding text dialog, that shows up for > >>>>>>> example when you try to open with OOo an unkown file format (by > >>>>>>> default is treated as text, and you are prompted to select the > >>>>>>> encoding, etc.) > >>>>>>> > >>>>>>> Aren't you passing a filter name? > >>>>>> even if he doesn't use a filter name, the type detection should work > >>>>>> well for .doc and .ppt files. Sounds strange. > >>>>> The type detection works well and the correct filter is detected as I > >>>>> understand. The problem here, is that the mentioned filters need > >>>>> character encoding, thus the FilterOptions dialog ( not "Unknown file > >>>>> format" dialog ) is shown. > >>>>> > >>>> i don't think so. A valid .doc file is auto detected and the word filter > >>>> doesn't have a filter options dialog as far as i know. It looks more > >>>> like the scenario that Ariel has described. > >>> Sorry, I was wrong in my last comment. > >>> Indeed the text filter still wins sometimes by unknown formats, although > >>> actually the filter selection dialog should be shown. And MSWord filter > >>> has no filter options dialog. > >>> > >>>> Maybe a complete code snippet could help to understand ... > >>> It is probably more interesting to take a look to the document. I > >>> suspect that Bernard is right and the document is no valid .doc document. > >>> > >>> Best regards, > >>> Mikhail. > >>> > >>>> Juergen > >>>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: [email protected] > >>> For additional commands, e-mail: [email protected] > >>> > >> > >> _________________________________________________________________ > >> Windows 7: Simplify what you do everyday. Find the right PC for you. > >> http://windows.microsoft.com/shop > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > _________________________________________________________________ New Windows 7: Find the right PC for you. Learn more. http://windows.microsoft.com/shop
