From mint-bounce@lists.fishpool.fi Sun Sep 13 16:20:53 2009 To: From: Peter Slegg Subject: Re: [MiNT] Highwire coding question Reply-To: Peter Slegg X-Mailer: MyMAIL Rev:1.91.13668 (Atari/(STiK/STinG/GlueSTiK)) X-Hardware: Atari Milan MIME-Version: 1.0 Date: Sat, 13 Sep 2009 20:18:25 +0200 (GMT) Content-Type: text/plain; charset="iso-8859-1" X-Priority: 3 X-MSMail-Priority: Normal Message-Id: <00557bc7.019636d61d91@smtp.freeola.net> References: <200909131719.p43342@b.maus.de> In-Reply-To: 200909131719.p43342@b.maus.de X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: p.slegg@scubadivers.co.uk Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.sparemint.org id n8DKKldQ005645 On Sun, 13 Sep 2009 17:19:00 , Gerhard_Stoll@b.maus.de (Gerhard Stoll) wrote: > > > Any suggestions ? > > The problem is that Highwire store the text as utf16 (see edit_char). > > where strChunk is just the relevant portion of the 'input' string > > And how you do that? > > If it "strChunk = strncpy(input, start, end-start);" you copy not all > character, because strncpy copy bytes and not word. So that ist also wrong > "CHAR * strChunk;", there must be "WCHAR". > ah, that's why it doesn't work. So would it help to search the original string rather than try to copy a piece of it ? I just need to work out the relevant pointers which I have failed to do so far. Regards, Peter