[CREATE] Clipping Path names in TIFF files
Simon Budig
simon at budig.de
Tue Jun 5 07:39:52 PDT 2007
Leonard Rosenthol (leonardr at pdfsages.com) wrote:
> On this note, I have discussed the issue with the "file format guy"
> on the Photoshop team and he said that the reason that we've never
> implemented Unicode names before is that no one really bothers to use
> them. However, he thinks UTF-8 support for the names makes perfect
> sense and we will implement and support them in a future version of
> our products (assuming we can hide it from marketing ;).
Cool.
I have just committed the changes in the tiff plugins for the Gimp.
Right now the logic is like this:
on save:
- can the utf-8 name be encoded as iso8859-1?
yes: store it as such (clipped to 255 bytes)
no: clip the name to at most 255 - 3 bytes, prepend it with
"\xEF\xBB\xBF" (Unicode 0xfeff encoded as UTF-8) and store
the result.
on load:
- is the length >= 3, starts with "\xEF\xBB\xBF" and validates as
UTF-8?
yes: use everything after the marker as name.
no: assume iso8859-1 and convert this to utf-8.
So right now euro signs in path names as saved by photoshop will appear
as a 0x80 placeholder in the gimp and will survive a roundtrip through
gimp.
Leonard: could you try to figure out what encoding actually gets used
there? Depending on the number of affected characters and their use it
might be feasible to put some effort into en/recoding this, although I
right now would prefer to avoid this work.
Please test. Comments are always welcome.
Thanks,
Simon
--
simon at budig.de http://simon.budig.de/
More information about the CREATE
mailing list