- /* We're going to tell the converter that the errbuff len is empty.
- This prevents the existing errbuff from being 'flushed' out onto
- itself. If the errbuff is needed by the converter this time,
- we're hosed - we're out of space! */
-
- args->converter->charErrorBufferLength = 0;
-
- ucnv_fromUnicode(args->converter,
- &newTarget,
- newTargetLimit,
- source,
- sourceLimit,
- NULL,
- FALSE,
- &err2);
-
- /* We can go ahead and overwrite the length here. We know just how
- to recalculate it. */
-
- args->converter->charErrorBufferLength = (int8_t)(
- newTarget - (char*)args->converter->charErrorBuffer);
-
- if((newTarget >= newTargetLimit) || (err2 == U_BUFFER_OVERFLOW_ERROR))
- {
- /* now we're REALLY in trouble.
- Internal program error - callback shouldn't have written this much
- data!
- */
- *err = U_INTERNAL_PROGRAM_ERROR;
- return;
- }
- else
- {
- /* sub errs could be invalid/truncated/illegal chars or w/e.
- These might want to be passed on up.. But the problem is, we already
- need to pass U_BUFFER_OVERFLOW_ERROR. That has to override these
- other errs.. */
-
- /*
- if(U_FAILURE(err2))
- ??
- */
- }
+ /* We're going to tell the converter that the errbuff len is empty.
+ This prevents the existing errbuff from being 'flushed' out onto
+ itself. If the errbuff is needed by the converter this time,
+ we're hosed - we're out of space! */
+
+ args->converter->charErrorBufferLength = 0;
+
+ ucnv_fromUnicode(args->converter,
+ &newTarget,
+ newTargetLimit,
+ source,
+ sourceLimit,
+ NULL,
+ FALSE,
+ &err2);
+
+ /* We can go ahead and overwrite the length here. We know just how
+ to recalculate it. */
+
+ args->converter->charErrorBufferLength = (int8_t)(
+ newTarget - (char*)args->converter->charErrorBuffer);
+
+ if((newTarget >= newTargetLimit) || (err2 == U_BUFFER_OVERFLOW_ERROR))
+ {
+ /* now we're REALLY in trouble.
+ Internal program error - callback shouldn't have written this much
+ data!
+ */
+ *err = U_INTERNAL_PROGRAM_ERROR;
+ return;
+ }
+ /*else {*/
+ /* sub errs could be invalid/truncated/illegal chars or w/e.
+ These might want to be passed on up.. But the problem is, we already
+ need to pass U_BUFFER_OVERFLOW_ERROR. That has to override these
+ other errs.. */
+
+ /*
+ if(U_FAILURE(err2))
+ ??
+ */
+ /*}*/