Re: [Vala] Is it possible to do a reading buffer offset in vala?



On Tue, 2010-02-09 at 19:04 +0100, Jiří Zárevúcky wrote:
JM píše v Út 09. 02. 2010 v 18:52 +0100:
Hello Jiří
Thanks! It works fine with pointers. just like in C. I just there was a
possibility to avoid them in vala because I have to manage them
manually.
But it's also fine this way. 

The only "manual" thing you are doing is moving the pointer. I don't see
any way this could possibly be done automatically. :)

Another question:
Is there some trick to cast the read data back to utf-8? Otherwise the
content of the file is unreadable in some parts (For example if I write
your name to the file :) )?
Regards
Jörn



It should be possible to simply cast the array to a string.
Or I don't understand the problem.

I think the problem is that you shouldn't read/write utf-8 strings at
arbitrary positions in the buffer. You may cut a multibyte char, which
will break the rest of the string.

        Xav




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]