openexr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-devel] UNICODE support in openexr file I/O


From: Florian Kainz
Subject: Re: [Openexr-devel] UNICODE support in openexr file I/O
Date: Thu, 19 Jan 2006 16:12:22 -0800
User-agent: Mozilla Thunderbird 1.0 (X11/20041207)

OpenEXR uses strings in three places:

- File names
- Attribute names, for example, "displayWindow" or "pixelAspectRatio".
- Attribute values, for example the channel names in the channels attribute.

String processing operations performed by the IlmImf library include:

- copying
- comparing and sorting, in order to find attributes or channels by name
- concatenation, usually to generate error messages such as
  "Cannot open file foo.exr (Permission denied)."

As far as I know, all of those operations work the same way for regular char strings and for UTF-8-encoded Unicode. (Character counting or sub-string extraction would have to know about UTF-8, but we don't do that in IlmImf.)

Florian


Bob Friesenhahn wrote:
On Thu, 19 Jan 2006, Yves Poissant wrote:

Re: [Openexr-devel] UNICODE support in openexr file I/OYou don't need any changes in the interface to support UTF-8. Storing and retrieving UTF-8 strings is done with traditional 8bits string based functions. IMO, something like "character strings are in UTF-8 format" could be part of the specifications though. Unless you are thinking about sone API that would translate UTF-8 to Unicode back and forth automatically.

My understanding of UTF-8 is that some characters require multiple octets to represent so it is not so simple as simply assuming that strings are UTF-8. The library needs to be prepared to handle UTF-8 internally if it does any string parsing. It needs to know for sure if the string is UTF-8. Some existing strings may use extended characters (in the system's native character set) but not UTF-8.

Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


_______________________________________________
Openexr-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/openexr-devel






reply via email to

[Prev in Thread] Current Thread [Next in Thread]