Hi Miklos,
Thank you for your answer.
On Mon, 23 Jan 2017 10:10:45 +0100, Miklos Vajna <vmiklos@collabora.co.uk> wrote:
On Fri, Jan 20, 2017 at 11:25:00AM +0900, Takeshi Abe <tabe@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.
OK, that confirms my understanding about UNO API. But it still sounds
neutral whether the original path can be in a foreign encoding,
as the percent-encoded one can contain only ASCII chars (so may be passed
to UNO interface transparently.)
Cheers,
-- Takeshi Abe
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.