@Aramir said in QRegExp returning incorrect position due to codec ?:
ve seen many SD cards/emmc die in ereaders (devices I'm aiming for) therefore I'm trying to lower the write operations on it in order to not reduce their lifetime. That's it I think it's worth the trouble to figure out a solution to this problem instead of creating more and more e-waste.
Again a useless optimization due to a feeling. Optimize only when you can prove it's a problem and needs to be optimzied.
You SD-Card has likely a sector size of 512 or 1024 bytes. On top of this your filesystem may use a block size up to 64kb (NTFS, ext4 use 4kb ). So when you even change single byte in your file which is less than the sector size or block size it will write the whole sector/block.
It's just plain stupid and an over-complicating of things for nothing.