[Insight-users] Using ITK with unicode character set

Nithiananthan, Sajendra Sajendra.Nithiananthan at rmp.uhn.on.ca
Tue Jul 3 09:55:16 EDT 2007



> -----Original Message-----
> From: Sean McBride
> 
> On 7/3/07 10:04 AM, Sébastien Fricker said:
> 
> >I assume that because char type is too small to hold Unicode 
> encoding so I
> >need to use wchar_t.
> 
> This assumption is incorrect.  I really suggest you read:
> <http://www.joelonsoftware.com/articles/Unicode.html>
> 
> char* is perfectly fine for a unicode string that is encoded as UTF8.
> 
> 
> After reading the above article, the question you should ask (and I
> don't know the answer) is "What encoding does ITK's 
> SetFileName() expect?".
> 
> -- 

char * might be perfectly fine for UTF8, but you can't guarantee that the
Windows File System will understand UTF-8.  Windows likes to use wide
characters for filenames (at least on some systems I've seen) so you have to
account for that.

This e-mail may contain confidential and/or privileged information for the sole use of the intended recipient. Any review or distribution by anyone other than the person for whom it was originally intended is strictly prohibited. If you have received this e-mail in error, please contact the sender and delete all copies. Opinions, conclusions or other information contained in this e-mail may not be that of the organization.


More information about the Insight-users mailing list