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: Nick Porcino
Subject: RE: [Openexr-devel] UNICODE support in openexr file I/O
Date: Mon, 23 Jan 2006 17:07:00 -0800

UTF-8 is sufficient for Japanese.

cf. putwchar(c)
{
  if (c < 0x80) {
    putchar (c);
  }
  else if (c < 0x800) {
    putchar (0xC0 | c>>6);
    putchar (0x80 | c & 0x3F);
  }
  else if (c < 0x10000) {
    putchar (0xE0 | c>>12);
    putchar (0x80 | c>>6 & 0x3F);
    putchar (0x80 | c & 0x3F);
  }
  else if (c < 0x200000) {
    putchar (0xF0 | c>>18);
    putchar (0x80 | c>>12 & 0x3F);
    putchar (0x80 | c>>6 & 0x3F);
    putchar (0x80 | c & 0x3F);
  }
}

Good resource here:
http://czyborra.com/utf/#UTF-8


-----Original Message-----
From: address@hidden
[mailto:address@hidden On
Behalf Of Drew Hess
Sent: Monday, January 23, 2006 12:10 PM
To: address@hidden
Cc: address@hidden
Subject: Re: [Openexr-devel] UNICODE support in openexr file I/O


"Santiago " <address@hidden> writes:

> In fact, I NEED to write japanese Kanji comments into an OpenEXR
> file and ALSO name the file in Kanji... so UTF-8 C++ char is not
> enough... I need 16-bits or even 32-bits UNICODE wchar_t
> support. You should add _wfopen()/wsprintf routines to you library
> to do this. thx.


Assuming we provide UTF-8 support for filenames and attribute values,
why can't you convert your application's characters to UTF-8 before
calling OpenEXR APIs?

d




_______________________________________________
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]