Search Through UOT Files

The UOT (United Office Text) is part of the UOF (United Office Format) group of file formats used by Chinese office suites. OpenOffice Writer can also save UOT files.

PowerGREP does not have built-in support for UOT. It does include an external converter as an example. You can find it as uot2txt.exe in the Examples subfolder of PowerGREP's installation folder. That is C:\Program Files\Just Great Software\PowerGREP 5\Examples by default. C# source code is also included. This executable requires version 4.5 of the .NET framework to run. Windows 8, 8.1, and 10 include .NET 4.5. For Windows Vista SP2 and Windows 7 SP1, you can download .NET 4.5 (48 MB) if you don't have it installed already. Windows XP is not supported.

To use the converter, click the (...) button next to "file formats to convert plain text with" on the File Selector panel. Select the configuration you want to edit. Or, create a new configuration by selecting the configuration you want to clone and then clicking the New button in the left hand side of the dialog box. Which configuration is best as a starting point depends on whether you want to search through any other files at the same time as searching through UOT files. For this example it doesn't matter.

Click the New button in the right hand corner of the dialog box to add a custom file format to the configuration. Name the format "United Office Text (UOT)" and enter *.uot as its file mask. Untick all checkboxes except "use an external application to convert files to plain text". Enter this command line:

"%APPPATH%\Examples\uot2txt.exe" "%INFILE%" "%OUTFILE%"

Set the encoding to "Unicode, UTF-16 little endian".

All of this tells PowerGREP to convert files with an .uot extension using uot2txt.exe which can be found in the Examples folder of the folder where you installed PowerGREP. PowerGREP should pass the full paths to both the input file (the .uot file) and the output file (a plain text) file to the external converter. PowerGREP should use the UTF16-LE encoding to read the plain text conversion.

Click OK to save and select the new configuration. You can now use the Editor|Open menu item to open an UOT file and view it in PowerGREP's built-in editor. You won't be able to edit the file. You can edit its plain text representation if you first use File|Save As to save it as a plain text file.

If you want to search only through UOT files, enter the file mask *.uot in the "include files" box on the File Selector panel. If you leave the "include files" and "exclude files" boxes blank, then PowerGREP searches through the plain text conversion of all file formats enabled by the configuration, as well as through the raw contents of all files that are not recognized as one of those file formats.

This file selection is available in the PowerGREP5.pgl library as "Office: Search through UOT files".