[V4CC] questions about encoding

Dave Parizek david at parizek.com
Fri Jun 29 00:38:17 CDT 2007


I can set the storage encoding of a Valentina database using:

[mDatabase setStorageEncoding:@"UTF8"];

Is that correct?  I see I am supposed to pass an NSString*, but  
should it be @"UTF-8", @"UTF8", or something else? - I do not see any  
constants defined for this in the documentation.

It is recommended to leave it generally at the default of UTF16.

But if you are using a MacWestern language only, then you might want  
to go with UTF8, because then you use 1 byte per character instead of  
2 bytes, saving storage space.


But does that mean Valentina has to constantly convert the stored  
UTF8 data into UTF16 for internal use?


So it comes to a tradeoff of faster if you stick with UTF16 (avoiding  
conversion time), versus less storage space required if you use  
UTF8?  Am I understanding correctly?



I think I like faster better than smaller... but want to make sure I  
understand the implications...

--Dave




More information about the Valentina mailing list