Ticket #482 (new enhancement)

SVN Diffs for #482

 

Opened 8 years ago

Last modified 9 months ago

Add conversion mode for continuous offsets

Reported by: markus.scherer(at)jtcsv.com Assigned to: michaelow
Priority: trivial Milestone: UNSCH
Component: conversion Version: 1.5
Keywords: Cc:
Load: Xref:
Java Version: Operating System: all
Project (C/J): all Weeks: 0.5
Review:

Description (Last modified by grhoten)

the conversion api allows to pass an offsets array parallel to the target array. each element k number i in k=offsets[i] will get an index that indicates that the output element target[i] comes from the source character that begins at source[k].

this is discontiguous: when an input character spans two conversion calls/buffers, the offset index is -1. an application can try to avoid this by passing complete input characters in each call/buffer, but that may not be the best thing to do.

i propose to add a mode (set/get functions with boolean value like usesFallback) and implementation to allow continuous offset indexing. indexing would not be zero-based with the buffer but with the entire stream. it would start at 0 with a new converter, after a reset() and after a flush=TRUE. otherwise, the offset indexes should count continuously as if all source buffers were one stream. this can then be contiguous because the start of a source character in a previous buffer is still a valid index. such an index would need to be stored in UConverter. the mode (on/off) needs to be stored there, too.

the mode switch is necessary because a change for all such conversions without explicit selection would break existing applications.

Attachments

Change History

12/31/69 17:31:51 changed by notes2

Helena: Last time I checked with MQ (early 2002), no one seems to care about this feature.

12/31/69 17:31:52 changed by auditor

  • Fri Jul 21 13:51:35 2000 hshih moved from incoming to feature
  • 03/19/02 20:37:59 mark moved from feature to conversion
  • 10/29/02 15:00:19 hshih changed notes2
  • Thu Mar 16 10:37:47 2006 grhoten changed notes2: assign: "markus" to "grhoten",
  • Fri Oct 13 23:17:07 2006 grhoten changed notes2: priority: "small" to "zero",

10/03/07 21:49:40 changed by grhoten

  • load changed.
  • xref changed.
  • java changed.
  • description changed.
  • summary changed from RFE: feature: conversion mode for continuous offsets to Add conversion mode for continuous offsets.
  • project set to all.
  • keywords deleted.
  • revw changed.

03/06/08 15:06:16 changed by grhoten

  • owner changed from grhoten to michaelow.

Add/Change #482 (Add conversion mode for continuous offsets)




Anti spam check: