Re: Content string encoding?
- From: Murray Cumming <murrayc murrayc com>
- To: Alexander Larsson <alexl redhat com>
- Cc: gnome-vfs-list gnome org, Jonathon Jongsma <jonathon quotidian org>
- Subject: Re: Content string encoding?
- Date: Fri, 01 Feb 2008 17:36:13 +0100
On Fri, 2008-02-01 at 09:54 +0100, Alexander Larsson wrote:
> On Fri, 2008-02-01 at 01:01 +0100, Murray Cumming wrote:
> > We are wrapping the g_content_type_* functions for giomm, and have a
> > question:
> >
> > Can/must the content strings here be UTF-8, or are they a blob of data
> > of unknown encoding (a bit like a URI)
> > http://library.gnome.org/devel/gio/unstable/gio-GContentType.html
>
> I'm not sure. I mean, on unix they are mimetypes, and on windows they
> are extension strings like ".doc", "audio", "*". Both of these will in
> practice be ASCII strings in all cases, but I don't think there is
> anything prohibiting e.g. adding a non-ascii type in the windows
> registry which then could be returned to the app via gio.
Could that mean that they are ever some odd encoding such as UCS2, which
would not be UTF-8?
> For unix the source of mime-types is the freedesktop shared mime spec,
> and its files are defined in utf8, so all unix mimetypes should be utf8.
> Maybe we can say that the content type must be utf8, and then we filter
> out those who are not (in practice none).
>
> Also, URIs are not undefined, they are a limited subset of ASCII. If any
> non-ascii character is unescaped in the URI it is invalid (by the spec).
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]