A question about com.sun.star.frame.XStorable's URL

Miklos Vajna vmiklos at collabora.co.uk
Mon Jan 23 09:10:45 UTC 2017


Hi,

On Fri, Jan 20, 2017 at 11:25:00AM +0900, Takeshi Abe <tabe at fixedpoint.jp> wrote:
> Preparing a patch for tdf#105382 [1], I come across a question about
> character encoding for the path part of a URL representing a
> com.sun.star.frame.XStorable's location.
> I wonder if the original (before percent-encoded) path of such a URL can
> be in an encoding other than UTF-8 or even in a different charset due
> to e.g. a code page of some legacy filesystems.
> Is it possible?
> And, if so, is there any reasonable way to tell the encoding?

The UNO API works with UNOIDL strings, where those strings are
represented as OUStrings in C++, which is an array of Unicode
characters.

I think this means you have to decide encoding when you convert your
OString (or other byte array) data to OUString, before calling any UNO
API.

Regards,

Miklos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20170123/e471a371/attachment.sig>


More information about the LibreOffice mailing list