Message128785
> No you don't. You can copy a substring of the input string with
Py_UNICODE_COPY: just pass a smaller length.
Oh, yes, I got your meaning now. I'll follow this.
> You can truncate the input char* on the call to PyUnicode_DecodeUTF8:
Oh, what if the trunked char* cannot be decoded correctly? e.g. a tow-bytes character is divided in the middle?
> Yes, but I am no more sure that it is the right thing to do.
If I understand correctly(my English ability is limited), your suggestion is to combine, right? I'm afraid that combine may bring us too complicated code to write. The currently 4 steps just divide the process into smaller and simpler pieces. I'm not sure. |
|
Date |
User |
Action |
Args |
2011-02-18 15:02:37 | ysj.ray | set | recipients:
+ ysj.ray, lemburg, mark.dickinson, vstinner, eric.smith, ron_adam, ezio.melotti |
2011-02-18 15:02:37 | ysj.ray | set | messageid: <1298041357.84.0.352337402226.issue7330@psf.upfronthosting.co.za> |
2011-02-18 15:02:35 | ysj.ray | link | issue7330 messages |
2011-02-18 15:02:35 | ysj.ray | create | |
|