Ulf Zibis wrote:
Am 14.05.2009 22:55, Xueming Shen schrieb:
Thanks again for taking time on this. Here is the IBM db charsets webrev

http://cr.openjdk.java.net/~sherman/ibmdb/webrev

This is a bigger fish than the EUC_TW:-)



*** Encoder-Suggestions:

(26) Why copying String to char[] in initC2B(), String access should be same fast?:
     - char[] sb = b2cSB.toCharArray();
     - char[] db = b2c[i].toCharArray();

-Ulf



because the b2c tables need to be updated before used to generate the c2b tables, if there is a b2cNR table (means there are multiple "bytes" mapped to a single same "char", when do c->b, we need to know which "bytes" to map to, this is done by specified that in .nr map). In theory we need only do that if b2cNR presents, but I don't want to keep two paths. A possible optimization is to pass in char[] instead of String, then only make a copy when necessary.

Reply via email to