Message128785
| Author |
ysj.ray |
| Recipients |
eric.smith, ezio.melotti, lemburg, mark.dickinson, ron_adam, vstinner, ysj.ray |
| Date |
2011年02月18日.15:02:35 |
| SpamBayes Score |
9.217493e-07 |
| Marked as misclassified |
No |
| Message-id |
<1298041357.84.0.352337402226.issue7330@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> 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. |
|